midlet1.java
来自「这是一个关于Java 2 Mobile Edition 的自定义组件的部分源码,」· Java 代码 · 共 39 行
JAVA
39 行
package customitem;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class MIDlet1 extends MIDlet {
private static MIDlet1 instance;
private Form mainForm = new Form("My Custom Item");
private Display display;
/** Constructor */
public MIDlet1() {
instance = this;
display = Display.getDisplay(this);
}
/** Main method */
public void startApp() {
mainForm.append(new Table("My Table", Display.getDisplay(this)));
display.setCurrent(mainForm);
}
/** Handle pausing the MIDlet */
public void pauseApp() {
}
/** Handle destroying the MIDlet */
public void destroyApp(boolean unconditional) {
}
/** Quit the MIDlet */
public static void quitApp() {
instance.destroyApp(true);
instance.notifyDestroyed();
instance = null;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?