📄 countdowndemo.java
字号:
/*
* 创建日期 2004-11-25
*
* TODO 要更改此生成的文件的模板,请转至
* 窗口 - 首选项 - Java - 代码样式 - 代码模板
*/
package countDown_2;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class CountDownDemo extends MIDlet implements CommandListener {
private final static Command exitCommand = new Command("Exit",
Command.EXIT, 1);
private final static Command beginCommand = new Command("Begin",
Command.SCREEN, 1);
private final static Command stopCommand = new Command("Stop",
Command.STOP, 1);
private final static Command editCommand = new Command("Edit",
Command.SCREEN, 1);
public CountDownDemo() {
}
protected void startApp() {
Canvas cav= new CountDown();
cav.addCommand(exitCommand);
cav.addCommand(beginCommand);
cav.setCommandListener(this);
Display.getDisplay(this).setCurrent(cav);
}
protected void pauseApp() {
}
protected void destroyApp(boolean c){
}
public void commandAction(Command c, Displayable d) {
if (c == exitCommand) {
destroyApp(false);
notifyDestroyed();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -