import javax.microedition.midlet.MIDlet; import javax.microedition.lcdui.*; public class Hello extends MIDlet implements CommandListener{ Display display; Form form; Command command; public void startApp(){ command = new Command("Выйти",Command.EXIT,0); display = Display.getDisplay(this); form = new Form("FORMA"); form.addCommand(command); form.append("Привет, Мир!"); form.setCommandListener(this); display.setCurrent(form); } public void pauseApp(){ } public void destroyApp(boolean unconditional){ notifyDestroyed(); } public void commandAction(Command c,Displayable d){ if(c==command){ destroyApp(false); notifyDestroyed(); } } }