gamemidlethold.java
来自「<j2me 开发精解> 詹建光著 里所有的源码。对J2me的开发相当」· Java 代码 · 共 33 行
JAVA
33 行
package com.j2medev.chapter5.example;
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
public class GameMIDletHold extends MIDlet {
static GameMIDletHold instance;
static Display display;
private GameScreenHold gameScreen;
public GameMIDletHold() {
instance = this;
gameScreen = new GameScreenHold(false); //产生实例
display = Display.getDisplay(this);
}
protected void startApp() throws MIDletStateChangeException {
gameScreen.start();// 启动线程
display.setCurrent(gameScreen);
}
protected void pauseApp() {
gameScreen.stop();// 停止线程
}
public void destroyApp(boolean flag) throws MIDletStateChangeException {
gameScreen.stop();// 停止线程
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?