The KJava API provides a set of classes for developing applications for Palm OS devices. KJava provides a
com.sun.kjava.Spotlet, which is similar to the J2SE
Canvas class with the addition of some callback methods for handling events. Applications can, therefore, extend the
Spotlet class and override the appropriate event handling methods to provide the required functionality.
Applications can create and use multiple spotlets to display different windows. Just like with the J2SE
Canvas, a spotlet is responsible for drawing itself as well as any GUI controls placed upon it.
We will be using the
Spotlet class in both of our KJava examples, a HelloWorld application, which we'll get to shortly, and the Scribble application, which we'll build in the section Development using KJava event handling.