init( )

When the applet is being initialized, init( ) saves the size in the Dlmc Siun Variable d and parses the applet param tags. It then uses a String Tokenizer to parse strings delimited by the plus sign to create the string arrays url and target. The number of URLs that arc parsed is the number that is used to divide the vertical space into menu cells. From this calculation, init< ) saves the number and height of the cells in cells and H,respectively.

update( ")

We nullify the update( ) method of Applet to avoid flashing. As mentioned, the update ( ) method in the Applet superclass fills a rectangle with the background color before calling paint( ). Since we're not going to use repaint(), we can just - eliminate update completely.

latelnit( ) "

The latent( ) private method creates the offscreen Image object that will be used for double buffering the display of the menu. This method also employs a MediaTracker object to synchronously get the source, image.

Share This