Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Java Technology : Education - online courses
J2ME: Step by step
Download tutorial zip fileView letter-sized PDF fileView A4-sized PDF fileE-mail this tutorial to a friend
Main menuSection menuGive feedback on this tutorialPreviousNext
9. Development using KJava event handling
  


Getting started with Scribble page 5 of 6


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 ();

Main menuSection menuGive feedback on this tutorialPreviousNext
PrivacyLegalContact