import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class Main extends MIDlet implements CommandListener { public Command exitMidlet; public Display mydisplay; public static Main midlet; ActivityMenu menu; public Main(){ exitMidlet = new Command("Exit",Command.SCREEN,2); mydisplay = Display.getDisplay(this); midlet = this; String[] list = { "java","game", "lunch"}; menu = new ActivityMenu("ActivityTest",list, 20,50,70); } public void startApp(){ mydisplay.setCurrent(menu); } public void pauseApp(){} public void destroyApp(boolean unconditional){ notifyDestroyed(); } public void commandAction(Command c, Displayable s){ if (c == exitMidlet){ destroyApp(false); notifyDestroyed(); } } }