customitemexample.java
来自「此文件是关于手机游戏开发的理论」· Java 代码 · 共 38 行
JAVA
38 行
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class CustomItemExample extends MIDlet implements CommandListener
{
private Form form;
public CustomItemExample()
{
form = new Form("A Custom Item");
form.append(new SmileyItem("Smile"));
form.addCommand(new Command("Exit", Command.EXIT, 0));
form.setCommandListener(this);
}
public void startApp()
{
Display.getDisplay(this).setCurrent(form);
}
public void pauseApp()
{
}
public void destroyApp(boolean unconditional)
{
}
public void commandAction(Command c, Displayable s)
{
if (c.getCommandType() == Command.EXIT)
notifyDestroyed();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?