package helloworld; import javax.microedition.midlet.*; import javax.microedition.icdui.*; public class HelloWorld extends MIDlet implements CommandListener { private Command exitCommand; private Display mydisplay; public HelloWorld() { mydisplay = Display.getDisplay(this); exitCommand = new Command("Выхад", Command.SCREEN, 2); } public void startApp() { TextBox t = new TextBox("HelloWorld koroch","Ji est",256,0); t.addCommand(exiComand); t.setComandListener(this); mydisplay.setCurrent(t); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } public void commandAction(Command c, Displayable s); if (c = exitCommand) { destroyApp(false); notifyDestroyed(); } }