📄 testtextbox.java
字号:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class testTextBox extends MIDlet implements CommandListener{
public TextBox tb1;
public Command c1;
public Display d;
public testTextBox(){
tb1=new TextBox("我的理想","One world One Dream",20,TextField.ANY);
c1=new Command("确定",Command.SCREEN,1);
tb1.addCommand(c1);
tb1.setCommandListener(this);
d=Display.getDisplay(this);
}
protected void destroyApp(boolean f) throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
protected void pauseApp() {
// TODO Auto-generated method stub
}
protected void startApp() throws MIDletStateChangeException {
d.setCurrent(tb1);
}
public void commandAction(Command c, Displayable d) {
if(c==c1){
Form f=new Form("您的理想");
String s=tb1.getString();
f.append(s);
Display.getDisplay(this).setCurrent(f);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -