?? startform.java
字號:
package xingzuo;import javax.microedition.lcdui.*;import java.io.IOException;public class startForm extends Form implements CommandListener { private static Command exitCmd; private static Command okCmd; private Image startImage; //顯示程序的啟動畫面// public startForm() { super(""); okCmd = new Command("進入", Command.OK, 1); exitCmd = new Command("離開", Command.EXIT, 1); startImage = mainClass.createImage("/picRes/logo.png"); this.addCommand(okCmd); this.addCommand(exitCmd); this.setCommandListener(this); this.append(new ImageItem(null, startImage, ImageItem.LAYOUT_CENTER, null)) ; //this.append(" ---------------------\n"); //this.append(" 星座 \n"); //this.append(" 版本: 1.0\n"); //this.append(" ---------------------\n"); Display.getDisplay(mainClass.instance).setCurrent(this); } public void commandAction(Command command, Displayable displayable) { if (command == okCmd) mainClass.ShowMainMenu(); if (command == exitCmd) mainClass.quitApp(); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -