import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class Main extends MIDlet implements Runnable { public static Display display; public MyGameCanvas mgc; private Thread thread; public Main(){ display=Display.getDisplay(this); mgc=new MyGameCanvas(); thread=new Thread(this); } public void startApp() { thread.start(); } public void pauseApp() { } public void destroyApp(boolean unconditional) { notifyDestroyed(); } public void run() { display.setCurrent(mgc); } }