?? ufo3midlet.java
字號:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
//import java.io.*;
public class UFO3MIDlet extends MIDlet implements CommandListener
{
private UFOCanvas canvas;
public void startApp()
{
//try
//{
if(canvas==null)
{
canvas=new UFOCanvas(Display.getDisplay(this));
Command exitCommand=new Command("Exit",Command.EXIT,0);
canvas.addCommand(exitCommand);
canvas.setCommandListener(this);
}
//啟動畫布canvas
canvas.start();
//}
//catch(IllegalArgumentException ee)
//{
// System.err.println("Error!");
//}
}
public void pauseApp(){}
public void destroyApp(boolean unconditional)
{
canvas.stop();
}
public void commandAction(Command c,Displayable s)
{
if(c.getCommandType()==Command.EXIT)
{
destroyApp(true);
notifyDestroyed();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -