Like

BAGI ANDA MERASA INI BERMANFAAT SILAHKAN LIKE PAGE ON FACEBOOK DIBAWAH INI!!!


Like Page halaman http://iswahyuniiswahyuni.blogspot.com/ di Facebook!!

Minggu, 31 Januari 2016

Mobile Programming Net Beans IDE 6.0 "Gambar Dengan Menu, List Menu Serta Alert"










Listing Program :

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

public class iswahyuni extends MIDlet implements CommandListener {
    Command C1,C2,C3,C4,keluar,back,back1,back2;
    Form F0,F1,F2,F3,F4;
    Ticker T;
    List List_Menu;
    Display Layar;
    Alert a;
    
    public iswahyuni (){
        C1 = new Command ("Daftar", Command.OK,0);
        C2 = new Command ("About",Command.OK,1);
        keluar = new Command ("Keluar", Command.EXIT,0);
        T = new Ticker ("ISWAHYUNI");
        a = new Alert ("Informasi", "Halaman Kosong",null, AlertType.INFO);
        F0 = new Form ("Menu Utama");
        F0.addCommand(keluar);
        F0.addCommand(C1);
        F0.addCommand(C2);
        F0.setTicker(T);
        F0.setCommandListener(this);
        try{
        Image gambar = Image.createImage("/yuni.jpg");
        ImageItem tampil = new ImageItem ("Gambar",gambar, Item.LAYOUT_CENTER, "Ket");
        F0.append(tampil);    
        } catch (Exception ex){
        }
        
        
        back2 = new Command ("Back",Command.BACK,0);
        F2 = new Form("About");
        F2.setTicker(T);
        F2.addCommand(back2);
        F2.setCommandListener(this);
        try{
        Image saya = Image.createImage("/saya.jpg");
        ImageItem yuni = new ImageItem ("ISWAHYUNI",saya, Item.LAYOUT_CENTER, "Ket");
        F2.append(yuni);   
        } catch (Exception ex){
        }
        
        
        back = new Command ("Back", Command.BACK,0);
        List_Menu = new List("Daftar",List.IMPLICIT);
        List_Menu.addCommand(back);
        List_Menu.setTicker(T);
        List_Menu.setCommandListener(this);
        try {
        Image Daftar1 = Image.createImage("/Daftar1.jpg");
        Image Daftar2 = Image.createImage("/Daftar2.jpg");
        Image Daftar3 = Image.createImage("/Daftar3.jpg");
        Image Daftar4 = Image.createImage("/Daftar4.jpg");
        List_Menu.append("Daftar1", Daftar1);
        List_Menu.append("Daftar2", Daftar2);
        List_Menu.append("Daftar3", Daftar3);
        List_Menu.append("Daftar4", Daftar4);
        } catch (Exception ex){   
        }
        
        
        back1 = new Command ("Back",Command.BACK,0);
        F1 = new Form("Daftar1");
        F1.append("Ini Halaman Daftar1");
        F1.addCommand(back1);
        F1.setTicker(T);
        F1.setCommandListener(this);
    
        F3 = new Form ("Informasi");
        
        
        
        }
    public void startApp() {
        Layar= Display.getDisplay(this);
        Layar.setCurrent(F0);
    
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }

    public void commandAction(Command C, Displayable arg1) {
        if (C==keluar){
            destroyApp(true);
            notifyDestroyed();
        }
        if (C==back){
            Layar.setCurrent(F0);
        }
        if (C==C1){
            Layar.setCurrent(List_Menu);
        }
        if (C==C2){
            Layar.setCurrent(F2);
        }
        if (C==back1){
            Layar.setCurrent(List_Menu);
        }
        if (C==back2){
            Layar.setCurrent(F0);
        }
        if (C==List.SELECT_COMMAND){
            int i = List_Menu.getSelectedIndex();
            String S = List_Menu.getString(i);
            if(S=="Daftar1"){
                Layar.setCurrent(F1);
            } else {
                Layar.setCurrent(a);
            }
            
            }
            }
        }
        

1 komentar:

  1. Strange "water hack" burns 2 lbs overnight

    Over 160k women and men are utilizing a easy and secret "water hack" to lose 2lbs each and every night in their sleep.

    It's scientific and it works on everybody.

    Here's how you can do it yourself:

    1) Get a clear glass and fill it up with water half the way

    2) And now use this awesome HACK

    and be 2lbs lighter the next day!

    BalasHapus