import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class Main extends MIDlet implements Runnable { public Display display; public static Main midlet; private Thread mainThread; private int flag; private Menu menu; private Image logo; public Main(){ display=Display.getDisplay(this); flag=1; mainThread=new Thread(this); menu=new Menu(); } public void startApp() { try { logo=Image.createImage("/logo.png"); } catch (Exception exc) { } mainThread.start(); } public void pauseApp() { } public void destroyApp(boolean unconditional) { notifyDestroyed(); } public void run(){ while(true){ if(flag==1) { display.setCurrent(menu); menu.loading(logo,2000); flag=2; } if(flag==2){ destroyApp(false); } } } }