September 2005
Beginner
576 pages
13h 6m
English
The paint() method of any applet is executed when the screen needs to be updated. This situation can be caused by the web browser or operating system outside of the applet obscuring part of an applet window or changing its dimensions in some way. The paint() method also can be called manually within an applet when the screen needs to be updated.
If you put a repaint(); statement in an applet, it forces the paint() method to be handled. This statement is a way you can tell the program that you have done something that requires a screen update. For example, if you are writing an animation program and you move an image from one place to another, you need to use repaint(); so the image is shown in its ...
Read now
Unlock full access