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() to be invoked by the AWT painting thread.

Showing Answers 1 - 1 of 1 Answers

 

The difference between paint() and repaint()

Paint():- The paint() method is called automatically whenever the window needs to be refreshed.

The programmer never calls paint() .

repaint():-Programmer calls repaint() in order to obtain a rendering.

repaint() then again call paint() to service repaint() method.

Thus the paint() method conjuction with update() method makes repaint();

Thank You.

Sandeep Kutwal.

  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