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 causepaint() to be invoked by the AWT painting thread. In Java, specifically in graphical user interface (GUI) programming using AWT or Swing, the paint() and repaint() methods serve different purposes. paint() method: The paint() method is part of the Component class (or its subclasses … Read more