?? setmobileform.java
字號:
package main;
import javax.microedition.lcdui.*;
public class SetMobileForm implements CommandListener{
private Midlet midlet=null;
private Main main=null;
public SetMobileForm(Midlet midlet,Main main)
{
this.midlet=midlet;
this.main=main;
Display.getDisplay(midlet).setCurrent(form);
form.append(textField);
form.addCommand(returnCommand);
form.addCommand(saveCommand);
form.setCommandListener(this);
}
Form form=new Form("設置手機號");
Command returnCommand=new Command("return",Command.OK,1);
Command saveCommand=new Command("save",Command.OK,1);
TextField textField=new TextField("",Main.mobile,11,TextField.ANY);
public void commandAction(Command cmd, Displayable arg1) {
if (cmd==returnCommand)
{
Display.getDisplay(midlet).setCurrent(main);
}
if (cmd==saveCommand)
{
String mobile=textField.getString();
main.mobile=mobile;
RMS.save(mobile);
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -