📄 mainselect.java
字号:
import javax.microedition.lcdui.*;
public class MainSelect extends Form implements CommandListener,ItemCommandListener
{
private Command exit,ok;
private StringItem firstItem;
public MainSelect()
{
super("Main Menu");
exit = new Command("Exit",Command.EXIT,1);
ok = new Command("Ok",Command.OK,1);
firstItem = new StringItem(null,"FirstItem",Item.PLAIN);
firstItem.setDefaultCommand(ok);
firstItem.setItemCommandListener(this);
append(firstItem);
addCommand(exit);
setCommandListener(this);
}
public void commandAction(Command com, Displayable dis)
{
WarMidlet.quitApp();
}
public void commandAction(Command com, Item item)
{
if(item.equals(firstItem))
{
War first = new War(this);
WarMidlet.dis.setCurrent(first);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -