?? concurrency.java
字號:
package com.j2medev.chapter3;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Concurrency extends MIDlet implements CommandListener{
private Display display = null;
private WatchCanvas canvas = null;
public void startApp() {
if(display == null){
display = Display.getDisplay(this);
canvas = new WatchCanvas(display,60);
canvas.addCommand(new Command("Exit",Command.EXIT,1));
canvas.setCommandListener(this);
}
display.setCurrent(canvas);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
public void commandAction(Command command, Displayable displayable) {
if(command.getCommandType() == Command.EXIT){
destroyApp(false);
notifyDestroyed();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -