helloword.java
来自「有关j2me初级入门,如何使多个midlet 同时运行,打包运行例子符源码」· Java 代码 · 共 35 行
JAVA
35 行
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class HelloWord extends MIDlet implements CommandListener{
private Display display;
private TextBox textbox;
private Command quitcommand;
public void startApp(){
display=Display.getDisplay(this);
quitcommand=new Command("quit",Command.SCREEN,1);
textbox=new TextBox("hello world","my first midlet",40,0);
textbox.addCommand(quitcommand);
textbox.setCommandListener(this);
display.setCurrent(textbox);
}
public void pauseApp(){
}
public void destroyApp(boolean unconditional){
}
public void commandAction(Command choice,Displayable displayable){
if (choice==quitcommand)
{
destroyApp(false);
notifyDestroyed();
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?