?? midlet6.java
字號:
package prj5_1;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.Item;
import javax.microedition.lcdui.StringItem;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
public class MIDlet6 extends MIDlet {
private Form mainForm = new Form("這是一個含有StringItem的Form");
private Display dis;
private StringItem si1 = new StringItem("StringItem1標題","StringItem1內容");
private StringItem si2 = new StringItem("StringItem2標題","StringItem2內容",Item.PLAIN);
private StringItem si3 = new StringItem("StringItem3標題","StringItem3內容",Item.BUTTON);
private StringItem si4 = new StringItem("StringItem4標題","StringItem4內容",Item.HYPERLINK);
protected void startApp() throws MIDletStateChangeException {
dis = Display.getDisplay(this);
dis.setCurrent(mainForm);
mainForm.append(si1);
mainForm.append(si2);
mainForm.append(si3);
mainForm.append(si4);
si3.addCommand(new Command("",Command.ITEM,1));
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
}
protected void pauseApp() {
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -