Java Reference
In-Depth Information
private Form helloForm;
private StringItem helloStringItem;
private Command exitCommand;
private List listContacts;
private Command okCommand1;
private void initialize() {
getDisplay().setCurrent(get_helloForm());
}
public void commandAction(Command command, Displayable displayable) {
if (displayable == helloForm) {
if (command == exitCommand) {
exitMIDlet();
} else if (command == okCommand1) {
getDisplay().setCurrent(get_listContacts());
}
}
}
public Display getDisplay() {
return Display.getDisplay(this);
}
public void exitMIDlet() {
getDisplay().setCurrent(null);
destroyApp(true);
notifyDestroyed();
}
public Form get_helloForm() {
if (helloForm == null) {
helloForm = new Form(null, new Item[] {get_helloStringItem()});
helloForm.addCommand(get_exitCommand());
helloForm.addCommand(get_okCommand1());
helloForm.setCommandListener(this);
}
return helloForm;
}
 
Search WWH ::




Custom Search