private final static String[] timeoutStrings = {
"2 Seconds", "4 Seconds", "8 Seconds", "Forever"
};
private final static int SECOND = 1000;
private Display display;
private boolean firstTime;
private Form mainForm;
public AlertDemo() {
firstTime = true;
mainForm = new Form("Alert Options");
}
protected void startApp() {
display = Display.getDisplay(this);
showOption();
}
/**
* 制造这个MIDlet的基本显示
* 在这个Form里面我们可以选择Alert的个中类型和特性
*/
private void showOption() {
if(firstTime) {
// choice-group for the type of the alert:
// "Alarm", "Confirmation", "Error", "Info" or "Warning"
ChoiceGroup types = new ChoiceGroup("Type", ChoiceGroup.POPUP,