puzzlemidlet.java
来自「J2me类windows 菜单的实现,以及拼图游戏」· Java 代码 · 共 46 行
JAVA
46 行
package gamepuzzle;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class puzzleMIDlet extends MIDlet implements Runnable{
public static puzzleMIDlet instance;
private Thread thread;
public mainCanvas mainC;
public About about;
/** Constructor */
public puzzleMIDlet() {
instance = this;
thread = new Thread(instance);
about = new About();
mainC = new mainCanvas();
}
/** Main method */
public void startApp() {
Display.getDisplay(this).setCurrent(about);
this.thread.start();
}
/** Handle pausing the MIDlet */
public void pauseApp() {
}
/** Handle destroying the MIDlet */
public void destroyApp(boolean unconditional) {
}
/** Quit the MIDlet */
public static void quitApp() {
instance.destroyApp(true);
instance.notifyDestroyed();
instance = null;
}
public void run()
{ try{
this.thread.sleep(2000);
Display.getDisplay(this).setCurrent(mainC);
}catch(Exception es){}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?