jbricksmidlet.java~3~

来自「j2me源代码」· JAVA~3~ 代码 · 共 48 行

JAVA~3~
48
字号
package pinball;import javax.microedition.midlet.MIDlet;import javax.microedition.lcdui.*;/** * This class is the entry point for JBricks. * It extends the MIDlet class, creates and * initializes the screen and engine objects, * handles pause and terminate requests from * the system, and provides handling code for * soft button presses. */public class JBricksMIDlet extends MIDlet implements CommandListener {    private Engine engine;    private Command exit;    public void startApp() {        exit = new Command("Exit", Command.EXIT, 1);        Screen screen = new Screen();        screen.setCommandListener(this);        screen.addCommand(exit);        engine = new Engine(screen);        Display.getDisplay(this).setCurrent(screen);    }    public void pauseApp() {}    public void destroyApp(boolean unc) {        engine.stop();        Display.getDisplay(this).setCurrent(null);    }    public void commandAction(Command cmd, Displayable s) {        if (cmd == exit) {            destroyApp(true);            notifyDestroyed();        }    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?