As with the HelloWorld application, we need to import the classes to be used by the Scribble application. Following is the block of text that identifies the classes used by Scribble:
import com.sun.kjava.Bitmap;
import com.sun.kjava.Button;
import com.sun.kjava.Dialog;
import com.sun.kjava.Graphics;
import com.sun.kjava.HelpDisplay;
import com.sun.kjava.Spotlet;
The Scribble
class extends the Spotlet
class used in J2SE. It begins by defining the final static class variables.
public class Scribble extends Spotlet
The class variable g
acts as a reference to the singleton Graphics
object used throughout the class:
static Graphics g = Graphics.getGraphics ();