J2ME: Hello World

Posted: October 14, 2011 in Informatika, Java
Tags: , , ,
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

/**
 * @author Ulinnuha
 */
public class HelloWorld extends MIDlet {

    private Display display;

    public HelloWorld(){
        display=Display.getDisplay(this);
    }

    public void startApp() {
        TextBox tb = new TextBox("Hai Hai", "Hello World, tugas Pertama KOMBER !", 240, 0);
        display.setCurrent(tb);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s