?? listing 3-7.java
字號:
package greeting;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class GoodbyeWorld 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("Goodbye World", "My second 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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -