/** * HelloWorld.java * * @author WanHui */ import javax.microedition.lcdui.Display; import javax.microedition.lcdui.TextBox; import javax.microedition.midlet.MIDlet; public class HelloWorld extends MIDlet { private TextBox textbox; /** * ConstrUCtor of the HelloWorld class */ public HelloWorld() { textbox = new TextBox("", "Hello World!", 20, 0); } /* * The startApp method is used for starting or restarting a MIDlet. * * @see javax.microedition.midlet.MIDlet#startApp() */ public void startApp() { Display.getDisplay(this).setCurrent(textbox); } /* * The pauseApp method is called by the system to ask a MIDlet to "pause" * * @see javax.microedition.midlet.MIDlet#pauseApp() */ public void pauseApp() { } /* * The destroyApp method is called by the system when the MIDlet is about to * be destroyed * * @see javax.microedition.midlet.MIDlet#destroyApp(boolean) */ public void destroyApp(boolean unconditional) { } }