?? tales.java
字號:
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.lcdui.*;
/*
* 創建日期 2005-9-5
*
* TODO 要更改此生成的文件的模板,請轉至
* 窗口 - 首選項 - Java - 代碼樣式 - 代碼模板
*/
/**
* @author 莫紫東
*
* TODO 要更改此生成的類型注釋的模板,請轉至
* 窗口 - 首選項 - Java - 代碼樣式 - 代碼模板
*/
public class Tales extends MIDlet implements CommandListener{
/**
*
*/
private Command exitCommand;
private SFCanvas sfcan;
public Tales() {
exitCommand=new Command("Exit",Command.EXIT,1);
SFCanvas sfcan=new SFCanvas();
sfcan.addCommand(exitCommand);
sfcan.setCommandListener(this);
Display.getDisplay(this).setCurrent(sfcan);
// TODO 自動生成構造函數存根
}
/* (非 Javadoc)
* @see javax.microedition.midlet.MIDlet#startApp()
*/
protected void startApp() throws MIDletStateChangeException {
// TODO 自動生成方法存根
//sfcan.thread.start();
}
/* (非 Javadoc)
* @see javax.microedition.midlet.MIDlet#pauseApp()
*/
protected void pauseApp() {
// TODO 自動生成方法存根
try{
sfcan.thread.wait();
}catch(Exception e){}
}
/* (非 Javadoc)
* @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
*/
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO 自動生成方法存根
sfcan=null;
}
public void commandAction(Command c,Displayable d){
if(c==exitCommand){
notifyDestroyed();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -