DEVFYI - Developer Resource - FYI

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

Java Interview Questions and Answers (part 1)


(Continued from previous question...)

97. What is the difference between the paint() and repaint() methods?

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

(Continued on next question...)

Other Interview Questions