typeStrings, null);
mainForm.append(types);
// choice-group for the timeout of the alert:
// "2 Seconds", "4 Seconds", "8 Seconds" or "Forever"
ChoiceGroup timeouts = new ChoiceGroup("Timeout", ChoiceGroup.POPUP,
timeoutStrings, null);
mainForm.append(timeouts);
// a check-box to add an indicator to the alert
String[] optionStrings = { "Show Indicator" };
ChoiceGroup options = new ChoiceGroup("Options", Choice.MULTIPLE,
optionStrings, null);
mainForm.append(options);
mainForm.addCommand(CMD_SHOW);
mainForm.addCommand(CMD_EXIT);
mainForm.setCommandListener(new AlerListener(types, timeouts, options));
firstTime = false;
}
display.setCurrent(mainForm);
}
private class AlerListener