Yosumu’s Weblog

Program Midlet 1

Posted by: Joehakim on: Januari 6, 2009

import javax.microedition.midlet.*;

import javax.microedition.lcdui.*;

public class HelloMidlet extends MIDlet

implements CommandListener {

Display display;

Command exitCommand =

new Command(“Exit”, Command.EXIT, 1);

Alert helloAlert;

public HelloMidlet(){

helloAlert = new Alert(

“Hello MIDlet”, “Hallo, dunia!”,

null, AlertType.INFO

);

helloAlert.setTimeout(Alert.FOREVER);

helloAlert.addCommand(exitCommand);

helloAlert.setCommandListener(this);

}

public void startApp() {

if (display == null){

display = Display.getDisplay(this);

}

display.setCurrent(helloAlert);

}

public void pauseApp() {

}

public void destroyApp(boolean unconditional) {

}

public void commandAction(Command c, Displayable d)

{

if (c==exitCommand)

{

destroyApp(true);

notifyDestroyed();

}

}

}

hasil program saat di jalankan :

hm

selamat mencoba…. semoga berhasil

Tinggalkan Balasan

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 / Ubah )

Twitter picture

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

Facebook photo

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

Connecting to %s


  • yosumu: silahkan cek nilai di ruang saya. Siapa tahu ad kekeliruan. Trims Joehakim
  • putra: bos nilai SBD ku ko dpt C... Ak da ngulang 2x...
  • yosumu: OK..terima kasih atas permintaannya...kami akan segera mengisi..mohon ditunggu. trims
Ikuti

Get every new post delivered to your Inbox.