Hello world
/*
* Package: test
* FileName: HelloWorld.java
*
* Created by pandian on Jun 15, 2010 11:08:28 AM
*/
package test;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
/**
* The Class HelloWorld.
*/
public class HelloWorld extends MIDlet {
private Form form;
private Display display;
/**
* Instantiates a new hello world.
*/
public HelloWorld() {
super();
}
/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
*/
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
System.out.println("Destroy called");
super.notifyDestroyed();
}
/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#pauseApp()
*/
protected void pauseApp() {
System.out.println("Pause called");
}
/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#startApp()
*/
protected void startApp() throws MIDletStateChangeException {
form = new Form("GrassField Test Midlet");
String msg = "This is a test message";
form.append(msg);
display = Display.getDisplay(this);
display.setCurrent(form);
}
}