Motorola MOTORAZR maxx V6 Developer's Manual page 162

Java me developer guide
Hide thumbs Also See for MOTORAZR maxx V6:
Table of Contents

Advertisement

Java ME Developer Guide
Chapter 22 - Network APIs
public class WakeUp extends MIDlet implements CommandListener{
public static Display display;
public static Form mainForm;
public static Command exitCommand;
public static TextField tf;
public static Command registerCommand;
public void startApp() {
display = Display.getDisplay(this);
mainForm = new Form("WakeUp");
exitCommand = new Command("Exit", Command.EXIT, 0);
registerCommand = new Command("Register", Command.SCREEN, 0);
tf = new TextField("Delay in seconds", "10", 10, TextField.NUMERIC);
mainForm.addCommand(exitCommand);
mainForm.addCommand(registerCommand);
mainForm.append(tf);
mainForm.setCommandListener(this);
display.setCurrent(mainForm);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
notifyDestroyed();
}
public void commandAction(Command c, Displayable s) {
if((c == exitCommand) && (s == mainForm)){
destroyApp(false);
}
if(c == registerCommand){
new regThread().start();
}
}
DRAFT - Subject to Change
[162/201]

Advertisement

Table of Contents
loading

Table of Contents