|
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.
|