?? gudanmidlet.java
字號:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.*;
public class GudanMIDlet
extends MIDlet {
private int init = 0;
public GudanMIDlet() {
Navigator.display = Display.getDisplay(this);
Navigator.midlet = this;
}
protected void startApp() {
Image img = null;
if (init == 0) {
try {
img = Image.createImage("/cartoon1.png");
}
catch (Exception e) {}
Alert splash = new Alert("片頭畫面");
splash.setImage(img);
splash.setType(AlertType.CONFIRMATION);
try {
Thread.sleep(1000);
}
catch (Exception e) {}
splash.setTimeout(40000);
Navigator.display.setCurrent(splash);
init++;
}
if (init == 1) {
try {
img = Image.createImage("/cartoon2.png");
}
catch (Exception e) {}
Alert splash3 = new Alert("片頭畫面");
splash3.setImage(img);
splash3.setType(AlertType.CONFIRMATION);
try {
Thread.sleep(1000);
}
catch (Exception e) {}
splash3.setTimeout(4000);
Navigator.display.setCurrent(splash3);
init++;
}
if (init == 2) {
try {
img = Image.createImage("/cartoon3.png");
}
catch (Exception e) {}
Alert splash3 = new Alert("片頭畫面");
splash3.setImage(img);
splash3.setType(AlertType.CONFIRMATION);
try {
Thread.sleep(1000);
}
catch (Exception e) {}
splash3.setTimeout(4000);
Navigator.display.setCurrent(splash3);
init++;
}
try {
Thread.sleep(2000);
}
catch (Exception e) {}
Navigator.current = Navigator.MAINMENU;
Navigator.show(null);
}
protected void pauseApp() {
}
protected void destroyApp(boolean con) {
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -