import javax.microedition.lcdui.*; import javax.microedition.midlet.MIDlet; public class Main extends MIDlet{ Run run; Display display; static Main main; /* ----- */ Image file, disk, icon; Font font; public Main () { if (display == null) { display = Display.getDisplay(this); run = new Run(); main = this; icon = makeImage("/res/icon.png"); file = makeImage("/res/file.png"); disk = makeImage("/res/disk.png"); font = Font.getFont(0,0,Font.SIZE_MEDIUM); } } void pauseApp () {} void destroyApp (boolean end) {} void startApp () { display.setCurrent(run); } /* ---- */ Image makeImage (String path) { try { return Image.createImage(path); } catch (java.io.IOException e) { return Image.createImage(16,16); } } /* --+-- */ void exit () { destroyApp(true); notifyDestroyed(); } }