class Applet
Here is the skeleton for our applet:
import java.applet.Applet ;
import java.awt.* ;
public class SnowFlakeBasic extends Applet
{
Graphics graph;
// draw a star consisting of six lines of length size
// radiating from the point (x,y)
//
private void drawStar( int x, int y, int size )
{
. . . .
}
public void paint ( Graphics gr )
{
graph = gr;
int width = getSize().width;
int height = getSize().height;
. . . . .
drawStar( . . . . );
}
}
We extend the Applet class and override the
paint() method.
The paint() method is called when the browser needs to fill
in the applet's part of the screen.