?? displayable1.java~9~
字號:
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class Displayable1 extends Form {
/** Constructor */
TextField message;
Command send ;
Command exit ;
MIDlet1 midlet;
public Displayable1(MIDlet1 midlet) {
super("Chat Form");
this.midlet = midlet;
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
/**Component initialization*/
private void jbInit() throws Exception {
// add the Exit command
message = new TextField("Message","",50,0);
send = new Command("Send",Command.SCREEN ,1);
exit = new Command("Exit",Command.EXIT ,1);
addCommand(send);
addCommand(exit);
this.append(message) ;
}
public void commandAction(Command c,Displayable d)
{
if(c == send)
{
midlet.destroyApp(false);
midlet.notifyDestroyed();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -