What is the difference between the paint() and repaint() methods

The paint() method supports painting via a Graphics object. The repaint() method is usedto cause paint() tobe invoked by the AWT painting thread.

Showing Answers 1 - 1 of 1 Answers

Whenever the window needs to be refreshed the paint() method is called automatically.The user does not specify the paint().
The user specifies the repaint() in order to obtain a rendering.repaint() is a method belonging to Component class. When it is called, it first calls the update() method and then paint() method.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions