EMON KHAN

»For more apps•games•songs«
»»¢lì¢k¬here««
LoginHomeRegister
J2ME Hello World Example
This is the simple hello world application.
In this example we are creating a form name "Hello World" and creating a string message "HelloWorld!!!!!!!"
as below:
 
Form form = new Form("Hello World");

String msg ="HelloWorld!!!!!!!";

In this application, To display the message we are using append method with the form as below:
form.append(msg);

The Application is as follows:

HelloWorld.java
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;

public class HelloWorld extends MIDlet{
private Form form;
private Display display;

public HelloWorld(){
super();
}

public void startApp(){
form = new Form("Hello World");
String msg = "Hello World!!!!!!!";
form.append(msg);
display = Display.getDisplay(this);
display.setCurrent(form);
}

public void pauseApp(){}

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

TOP-RATING
Contact with me: