Java ME Developer Guide

Chapter 22 - Network APIs

regForm.addCommand(regCommand);

regForm.addCommand(backCommand);

regForm.setCommandListener(this);

unregForm.addCommand(backCommand);

unregForm.addCommand(unregCommand);

unregForm.setCommandListener(this);

messageForm.addCommand(backCommand);

messageForm.setCommandListener(this);

}

public void pauseApp(){}

protected void startApp() { display.setCurrent(mainForm);

}

public void destroyApp(boolean unconditional) { notifyDestroyed();

}

public void showMessage(String s) { if(messageForm.size() != 0 ) messageForm.delete(0); messageForm.append(s); display.setCurrent(messageForm);

}

public void commandAction(Command c, Displayable s) {

if((c == unregCommand) && (s == mainForm)){ mc = c;

ms = s;

new runThread().start();

}

if((c == regCommand) && (s == mainForm)){ display.setCurrent(regForm);

}

if((c == regCommand) && (s == regForm)){ mc = c;

ms = s;

DRAFT - Subject to Change [159/201]

Page 159
Image 159
Motorola maxx V6 manual Draft Subject to Change 159/201