Copy Paste Catetan Kursus Java Middlet (Soalnya ga Bawa Flashdisk euy)

Hari ni ngikutin kursus pemograman Java Middlet ga bawa flashdisk jadi di save ke Blog aza. Biar inget.

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

public class awal extends MIDlet
        implements CommandListener {
    Form     f;
    Command cmdOK;
   
    public awal() {
       f = new Form(“Kursus J2ME Malam”);
       try {
        Image img = Image.createImage(“/logo.png”);
         f.append(img);
        } catch(Exception e) {
          System.out.println(e);
        }
        f.append(“\nKursus Malam”);
        f.append(“\nPanas Cuuuyyyy”);
        f.append(“\nKaga Pake AC”);
        
        Ticker t = new Ticker(
         “selamat Datang “+
         “di Lab Aplikasi & Pemrograman” );
        f.setTicker(t);
        
        cmdOK=new Command(“OK”,Command.OK,1);
        
        f.addCommand(cmdOK);
        f.setCommandListener(this);
     }
     public void startApp() {
      Display d = Display.getDisplay(this);
      d.setCurrent(f);
     }
     public void pauseApp() { }
     public void destroyApp(boolean b) { }
    
     public void commandAction(Command c,
          Displayable d ) {
         if(c==cmdOK) {
notifyDestroyed();
  }
 }
}

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s