Re: To use paint or paintComponent?
- From: "Jeff Higgins" <oohiggins@xxxxxxxxx>
- Date: Sat, 15 Mar 2008 20:18:29 -0400
travel2light wrote:
Which is the right one to use for Swing components? I have always used
JPanels with a method paint(Graphics g) and then just called that
method using 'repaint()'. But after reading some of the discussions
here I found out that the correct way to go is to use
paintComponent(Graphics g). Why is this? What is the difference
between the two methods? Thanks for any advice.
Michael
<http://java.sun.com/products/jfc/tsc/articles/painting/index.html#callbacks>
<http://java.sun.com/products/jfc/tsc/articles/painting/index.html>
.
- References:
- To use paint or paintComponent?
- From: travel2light
- To use paint or paintComponent?
- Prev by Date: To use paint or paintComponent?
- Next by Date: Re: To use paint or paintComponent?
- Previous by thread: To use paint or paintComponent?
- Next by thread: Re: To use paint or paintComponent?
- Index(es):
Relevant Pages
|
|