📄 test.java
字号:
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import java.lang.Thread;
import javax.microedition.midlet.MIDletStateChangeException;
public class Test extends MIDlet {
private TestCanvas theGame;
private Display dis;
public Test() {
theGame=new TestCanvas();
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
}
protected void pauseApp() {
}
protected void startApp() throws MIDletStateChangeException {
System.out.println("启动");
dis=Display.getDisplay(this);
dis.setCurrent(theGame);
try{
Thread myThread=new Thread(theGame);
myThread.start();
}catch(Exception ex){
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -