Difference b/w paint() and paintComponent()?

Difference b/w paint() and paintComponent()?

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

> PaintComponent()
> paintBorder()
> paintChildren()

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.

By:UMANG
Date:2019-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Swing SUB Links

Swing SUB interview questions and answers for experienced and fresher