📄 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 + -