FileDocCategorySizeDatePackage
EventsMIDlet.javaAPI DocExample4488Sun Nov 04 15:16:34 GMT 2001ora.ch5

EventsMIDlet

public class EventsMIDlet extends javax.microedition.midlet.MIDlet implements javax.microedition.lcdui.CommandListener

Fields Summary
private javax.microedition.lcdui.Display
display
protected boolean
started
private javax.microedition.lcdui.Command
exitCommand
Constructors Summary
Methods Summary
public voidcommandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)

        if (c == exitCommand) {
            // Exit. No need to call destroyApp
            // because it is empty.
            notifyDestroyed();
        }
    
protected voiddestroyApp(boolean unconditional)

    
protected voidpauseApp()

    
protected voidstartApp()

        if (!started) {
            display = Display.getDisplay(this);
            Canvas canvas = new EventsCanvas();            
            exitCommand = new Command("Exit", Command.EXIT, 0);
            canvas.addCommand(exitCommand);
            canvas.setCommandListener(this);
            display.setCurrent(canvas);
            
            started = true;
        }