Override update() to control the clearing of the applet. Normally
the parents update() will clear the screen and then call repaint(). By
overriding update() I can select to clear only the area where the words are
updated and leave the drawing alone. If the "Clear Screen"
button is clicked then update() clears the whole screen.
If you drag the mouse real fast you may see the repaint() counter is higher than the
paint() counter.
Example of implementing: ActionListener, MouseListener, MouseMotionListener.
Example of getSize() method to determine "width" & "height"
of the Applet area.
Click on the browser's Refresh (IE), Reload (Netscape), or Back then Forward and notice
the class's stop(), destroy(), init(), and start() are all incremented! Also screen
was cleared and applet was reloaded (probably from browser's cache).
Try switching Windows (Alt-Tab) or scrolling the browser window so that
the applet area needs to be painted again.
Notice that the applet's paint() method is called.
This class can be run as an Applet via a browser or as an application via a JVM
because it has a main() that will run the Applet just like a browser must
run the Applet.
Show how to pass HTML Parameters into a Java Applet.