ui_low7.java
来自「J2ME 无线通信技术应用开发源代码」· Java 代码 · 共 44 行
JAVA
44 行
// 程序名UI_Low7.java
// 测试图象的绘制——Image对象
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class UI_Low7 extends MIDlet implements CommandListener{
private Display display;
private MutableImage imageItem;
private Form form;
private Command cmdExit;
private Command cmdChange;
public UI_Low7(){
display = Display.getDisplay( this );
imageItem = new MutableImage();
form = new Form("Test mutable image");
form.append(imageItem);
cmdExit = new Command("Exit",Command.SCREEN,1);
cmdChange = new Command("Change",Command.SCREEN,1);
form.addCommand(cmdExit);
form.addCommand(cmdChange);
form.setCommandListener(this);
}
protected void startApp(){
display.setCurrent(form);
}
public void commandAction( Command c, Displayable d ){
if (c == cmdChange) {
imageItem.change();
return;
}
if (c == cmdExit){
destroyApp( true );
notifyDestroyed();
}
}
protected void pauseApp(){
}
protected void destroyApp( boolean unconditional ){
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?