Most applets and windows applications want to change what is drawn on the screen over its lifetime. This can be a sequenced animation, response to user input or mouse events, and so on. |
Whenever you want to redraw the screen, call
|
Repaint gets the graphics context and creates a thread to call update, which calls your paint function. So all your drawing changes are also put into paint. |