Ads 468x60px

Pages

Wednesday, July 20, 2011

Command class and Form class

mplementing command and Form Class


import javax.microedition.midlet.*;

import javax.microedition.lcdui.*;

public class Sample extends MIDlet 

{

 private Display display;

 private Command exit;

 private Form form;

 public Sample()

 {

  display = Display.getDisplay(this);

  exit = new Command("exit",Command.EXIT,1);

  form = new Form("hello");

 }

 
 public void startApp()

 {

  form.addCommand(exit);

  display.setCurrent(form);

 }


 public void pauseApp{ }


 public void destroyApp(boolean unconditional)

 {

  notifyDestroyed();

 }

}

No comments:

Post a Comment