rendered paste body/* * flightTime.java * * Created on 15 February 2007, 11:09 */package flight.org.uk;import javax.microedition.midlet.*;import javax.microedition.lcdui.*;import javax.microedition.rms.RecordStore;import javax.microedition.rms.RecordStoreException;/** * * @author William * @version */public class FlightTime extends MIDlet implements CommandListener{ FormsUtl formUtl = new FormsUtl(); RecordStoreUtl recordStoreUtl = new RecordStoreUtl(); MethodUtl methodUtl = new MethodUtl(); Alert splash; //= formUtl.setupSplashScreen(); Form flightForm; //= formUtl.setupFlightForm(); Alert exitAlert; //= formUtl.exitAlert(); /** *commandAction */ public void commandAction(Command c, Displayable s){ if (s == flightForm){ if(c.getCommandType() == Command.EXIT){ Display.getDisplay(this).setCurrent(exitAlert); } if(c.getCommandType() == Command.OK){ //.setText(this.calculate()); } } else if (s == exitAlert){ if(c.getCommandType() == Command.EXIT){ this.destroyApp(true); } if(c.getCommandType() == Command.BACK){ Display.getDisplay(this).setCurrent(flightForm); } } } public void startApp() { //create forms splash = formUtl.setupSplashScreen(); flightForm = formUtl.setupFlightForm(); exitAlert = formUtl.exitAlert(); Display.getDisplay(this).setCurrent(splash, flightForm); } public void pauseApp() { } public void destroyApp(boolean unconditional) { }}