import javax.microedition.lcdui.Alert; import javax.microedition.lcdui.AlertType; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.Form; import javax.microedition.lcdui.Image; import javax.microedition.lcdui.List; import javax.microedition.lcdui.TextBox; import javax.microedition.midlet.MIDlet; public class FW extends MIDlet implements CommandListener { public boolean ThreadStarted = false; public M m = null; public static FW fw = null; public static int MP; public Display display; public static Command LC; public static Displayable CD; public static Form F; public static TextBox TB; public static Alert A; public static List L; public void startApp() { MP = 0; this.display = Display.getDisplay(this); fw = this; LC = null; if(this.m == null) { this.m = new M(); M.T = this.m; M.I = Image.createImage(this.m.getWidth(), this.m.getHeight()); M.G = M.I.getGraphics(); M.KC = 0; TB = new TextBox("", "", 2, 0); A = new Alert("", "", (Image)null, AlertType.INFO); L = new List("", 3); this.display.setCurrent(this.m); CD = this.m; try { this.m.setCommandListener(this); } catch (Exception var2) { ; } F = new Form(""); F.setCommandListener(this); } else { this.m.repaint(); this.m.serviceRepaints(); } if(!this.ThreadStarted) { (new Thread(this.m)).start(); this.ThreadStarted = true; } } public void pauseApp() { MP = -1; } public void destroyApp(boolean var1) { this.m = null; M.I = null; M.G = null; CD = null; F = null; TB = null; A = null; L = null; fw = null; LC = null; this.notifyDestroyed(); } public void commandAction(Command var1, Displayable var2) { LC = var1; } }