import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class Main extends MIDlet implements CommandListener { private Command exit; private Command perexodT; private Command perexodL; private Command perexodA; private Display mydisplay; public void startApp(){ Display mydisplay = Display.getDisplay(this); Command exit = new Command("exit",Command.EXIT,1); Command perexodT=new Command("nextT",Command.SCREEN,2); Form myform = new Form("Forma vvod"); myform.addCommand(exit); myform.addCommand(perexodT); myform.setCommandListener(this); mydisplay.setCurrent(myform);} public void pauseApp(){} public void destroyApp(boolean unconditional){} public void CommandAction(Command c,Displayable d) { if (c==exit){destroyApp(false);notifyDestroyed();} if (c==perexodT){TextBox t=new TextBox("textbox","t",256,0); perexodL= new Command("nexl",Command.SCREEN,2); t.addCommand(exit); t.addCommand(perexodL); t.setCommandListener(this); Display.getDisplay(this).setCurrent(t);} if (c==perexodL){List mylist=new List("list",List.IMPLICIT); perexodA=new Command("nextA",Command.SCREEN,2); mylist.addCommand(exit); mylist.addCommand(perexodA); mylist.setCommandListener(this); Display.getDisplay(this).setCurrent(mylist);} Alert myalert =new Alert("alert","al",null,null); Display.getDisplay(this).setCurren(myalert);}}