java paint

Java repaint() Call paint()

The paint() method is called by the JVM implicitly in two circumstances. One is when the first time frame is created and displayed. The other is when the frame is resized (by dragging the frame border with mouse) by the user. If the programmer would like to call the paint()…