Java Reference
In-Depth Information
The PDAP AWT subset supports an unlimited number of frames, but the device might show only the
top frame on the screen. The frames may be restricted to a fixed size. When using both LCDUI screens
and AWT frames, the LCDUI display behaves similar to an additional frame. Mixing LCDUI and
AWT isn't recommended, and it isn't possible to mix AWT and LCDUI components in a single Frame
or Screen .
Note
PDA applications that don't rely on special microedition packages other than midlet can run on the
desktop without an emulation environment by implementing a dummy
javax.microedition.midlet.MIDlet class like that shown in the following code snippet:
package javax.microedition.midlet;
public class MIDlet {
protected abstract void startApp();
protected abstract void pauseApp();
protected abstract void destroyApp (boolean unconditional);
public void notifyDestroyed() {
System.exit (0);
}
}
In addition, you need to add a main method to the actual MIDlet implementation that creates a
corresponding instance and calls the startApp() method.
The corresponding main() method for the HelloPdap example is
public static void main (String [] argv) {
new HelloPdap().startApp();
}
Search WWH ::




Custom Search