Results 1 to 2 of 2
Thread: paint() and paintComponent()
- 07-17-2007, 03:34 AM #1
Senior Member
- Join Date
- Mar 2007
- Posts
- 134
- Rep Power
- 0
- 07-17-2007, 03:43 AM #2
Senior Member
- Join Date
- Mar 2007
- Posts
- 134
- Rep Power
- 0
I got the answers ....
Swing components has the paintComponent method while Non-swing AWT components do not have a paintComponent method.
A Swing component's default paint() has mainly three phases
1)painting the component
2) painting the component's border
3) finally painting all its children.
Overriding paintComponent in a custom Swing component only affects the drawing of the component itself without impacting these other phases of drawing.
Similar Threads
-
Problem going outside paintComponent
By Thez in forum Java 2DReplies: 9Last Post: 12-08-2007, 04:59 PM -
Drawing outside paintComponent()
By DarkSide1 in forum Java 2DReplies: 2Last Post: 11-08-2007, 10:36 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks