Components are rendered in the paint(Graphics) method, which is typically invoked under one of the following circumstances:
A system paint or update event is generated
An explicit call to repaint() is made
System paint and update events are generated whenever the component needs to be repainted as a result of manipulation of manipulating the window in which it resides. For example, if an applet window is covered by another window and subsequently brought to the front, a PaintEvent is generated and sent to the components within the applet that need to be repainted.
repaint() is often invoked explicitly, sometimes by the component itself, when the component's graphical representation changes. Component.repaint() is overloaded ...