rendered paste bodypackage org.flight.william;/* * FlightTimeMidlet.java * * Created on 22 February 2007, 12:11 */import javax.microedition.midlet.*;import javax.microedition.lcdui.*;/** * * @author William * @version */public class FlightTimeMidlet extends MIDlet implements CommandListener { FlightForm f = new FlightForm(this); SplashScreen ss = new SplashScreen(); ExitAlert ea = new ExitAlert(this); //AddCityForm acf = new AddCityForm(this); //RecordStoreUtl citys1; Form flightForm; Alert splash; Alert exit; //Form addCityForm; public void startApp() { System.out.println("excuted this line"); //setup items flightForm = f.setup(); splash = ss.setup(); exit = ea.setup(); //addCityForm = acf.setup(); //citys1 = new RecordStoreUtl("citys"); //citys1.addRecord("William"); //citys1.addRecord("mike"); //citys1.addRecord("Jonathan"); // citys1.listRecordsInStores(); System.out.println("Ok now executed this one"); Display.getDisplay(this).setCurrent(splash, flightForm); System.out.println("lastly done this one"); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } public void commandAction(Command c, Displayable s){ if (s == flightForm){ f.commandAction(c,s); } else if (s == exit){ ea.commandAction(c,s); } //else if(s == addCityForm){ // acf.commandAction(c,s); // } }}