1.

Difference Between Paint() And Paintcomponent()?

Answer»

The KEY point is that the paint() method invokes three methods in the FOLLOWING order :

As a GENERAL rule, in Swing, we should be overriding the paintComponent method unless we know what we are doing paintComponent() paints only component (panel) but paint() paints component and all its CHILDREN.

The Key point is that the paint() method invokes three methods in the following order :

As a general rule, in Swing, we should be overriding the paintComponent method unless we know what we are doing paintComponent() paints only component (panel) but paint() paints component and all its children.



Discussion

No Comment Found