Laman

Like

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


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

Jumat, 18 Desember 2015

Mobile Programming Net Beans IDE 6.0 "Menu Jadwal"





Listing Program :

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


public class Aplikasi_Jadwal extends MIDlet implements CommandListener {
    
    Form Futama,F1,F2,F3,F4;
    List list_menu;
    Display Layar;
    Ticker t;
    Command kembali1,kembali2,kembali3,kembali4,keluar;
    Command H1,H2,H3,H4,H5,H6,H7;
    
    public Aplikasi_Jadwal(){
       H1 = new Command ("Jadwal",Command.OK,0);
       H2 = new Command ("Dosen",Command.OK,1);
       keluar = new Command ("Keluar",Command.EXIT,0);
       t = new Ticker ("Aplikasi Jadwal Kuliah");
       Futama = new Form ("Halaman Aplikasi");
       Futama.append("Pilih menu untuk : \n - Jadwal \n - Dosen");
       Futama.addCommand(H1);
       Futama.addCommand(H2);
       Futama.addCommand(keluar);
       Futama.setTicker(t);
       Futama.setCommandListener(this);
       
        t = new Ticker ("Aplikasi Jadwal Kuliah");
    kembali1 = new Command ("Back",Command.BACK,0);
    list_menu = new List("Hari Jadwal Perkuliahan",List.IMPLICIT);
    list_menu.append("Senin",null);
    list_menu.append("Selasa",null);
    list_menu.append("Rabu",null);
    list_menu.append("Kamis",null);
    list_menu.append("Jum'at",null);
    list_menu.append("Sabtu",null);
    list_menu.addCommand(kembali1);
    list_menu.setTicker(t);
    list_menu.setCommandListener(this);
    
    kembali2 = new Command ("Back",Command.BACK,0);
    t = new Ticker ("Aplikasi Jadwal Kuliah");
    F1 = new Form("Jadwal Hari Kamis");
    F1.append("Mobile Programming \n08.15 s/d 10.30");
    F1.addCommand(kembali2);
    F1.setTicker(t);
    F1.setCommandListener(this);
       
    }
    public void startApp() {
         Layar = Display.getDisplay(this);
        Layar.setCurrent(Futama);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }

    public void commandAction(Command C, Displayable D) {
        if (C==keluar){
            destroyApp(true);
            notifyDestroyed();
       
    }
        if(C==H1){
           Layar.setCurrent(list_menu);
          }
        if(C==H2){
           Layar.setCurrent(F1);
          }
        if (C==kembali1){
            Layar.setCurrent(Futama);
        }
         if (C==kembali2){
            Layar.setCurrent(list_menu);
        }
        if(C==List.SELECT_COMMAND){
            int i=list_menu.getSelectedIndex();
            String S =list_menu.getString(i);
            if(S=="Kamis"){
                Layar.setCurrent(F1);
               }
        }
}
}


Mobile Programming Net Beans IDE 6.0 "List Menu"




Listing Program :


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

public class spidol extends MIDlet implements CommandListener {
    List list_menu;
    Command Keluar;
    Form Halaman_1;
    Display Layar;
   
    public spidol (){
        Keluar = new Command ("Exit", Command.EXIT,0);
        list_menu = new List ("Contoh List Menu", List.IMPLICIT);
        list_menu.append ("Hai1", null);
        list_menu.append ("Hai2", null);
        list_menu.append ("Hai3", null);
        list_menu.addCommand(Keluar);
        Halaman_1 = new Form ("Halaman Hai1");
        Halaman_1.append("Hai \n Hai \n Hai \n Hai");
        list_menu.setCommandListener(this);
    }
    public void startApp() {
        Layar=Display.getDisplay(this);
        Layar.setCurrent(list_menu);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }

    public void commandAction(Command C, Displayable D) {
        if (C==Keluar){
            destroyApp(true);
            notifyDestroyed();
        }
        if (C==List.SELECT_COMMAND){
            int i= list_menu.getSelectedIndex();
            String S = list_menu.getString(i);
            if(S=="Hai1"){
                Layar.setCurrent(Halaman_1);
            }
        }
    }
}

Senin, 14 Desember 2015

Mobile Programming Net Beans IDE 6.0 "Alert"



Listing Program :



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

public class a extends MIDlet implements CommandListener {
    Display D;
    Alert s;
    public a(){
        s=new Alert("Informasi","Belum ada",null,AlertType.INFO);
        
    }
    public void startApp() {
        D=Display.getDisplay(this);
        D.setCurrent(s);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }

    public void commandAction(Command arg0, Displayable arg1) {

    }
}


Mobile Programming Net Beans IDE 6.0 "Menu Halaman"





Listing Program :


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


public class kedua extends MIDlet implements CommandListener {
    Command H1,H2,H3,H4,Keluar,back;
    Ticker t;
    Form futama,F1;
    Display D;
    public kedua(){
     H1=new Command("halaman1",Command.OK,0);
     H2=new Command("halaman 2",Command.OK,1);
     H3=new Command("halaman 3",Command.OK,2);
     H4=new Command("halaman 4",Command.OK,3);
    Keluar=new Command("Keluar",Command.EXIT,0);
    back=new Command("Back",Command.BACK,0);
     t=new Ticker("Selamat Datang Cut Iswahyuni ");
    futama=new Form("halaman utama");
    futama.append("Pilih Menu Utaman Untuk memulai");
    futama.addCommand(H1);
    futama.addCommand(H2);
    futama.addCommand(H3);
    futama.addCommand(H4);
    futama.addCommand(H4);
    futama.addCommand(Keluar);
    futama.setTicker(t);
    futama.setCommandListener(this);
    F1=new Form("halaman1");
    F1.addCommand(back);
    F1.setCommandListener(this);
    
    }
    public void startApp() {
        D=Display.getDisplay(this);
        D.setCurrent(futama);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }


    public void commandAction(Command x, Displayable arg1) {
        if(x==Keluar){
            destroyApp(true);
            notifyDestroyed();
        }
        if(x==back){
            D.setCurrent(futama);
        }
        if(x==H1){
            D.setCurrent(F1);
        }
    }
}


Mobile Programming Net Beans IDE 6.0 "Menu"





Listing Programnya :

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

public class tess extends MIDlet implements CommandListener {
    Display D;
    Form fr,fr1;
    Command C,C1,C2;
    
    public tess (){
        fr = new Form ("Hello");
        fr1 = new Form ("Ayah");
        C = new Command ("Keluar", Command.EXIT,0);
        C1 = new Command ("Ayah", Command.OK,0);
        C2 = new Command ("Ibu", Command.OK,1);
        fr.append("Hai Cut Iswahyuni");
        fr1.append("Nama Ayah: Togar back\nPekerjaan: Wiraswasta");
        fr.addCommand(C);
        fr.addCommand(C1);
        fr.addCommand(C2);
        fr.setCommandListener(this);
        
    }
    public void startApp() {
        D=Display.getDisplay(this);
        D.setCurrent(fr);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }

    public void commandAction(Command arg0, Displayable arg1) {
        if (arg0==C){
            destroyApp(true);
            notifyDestroyed();
        }
        if (arg0==C1){
            D.setCurrent(fr1);
        }
    }
}

Mobile Programming Net Beans IDE 6.0 "Hello"



listing programnya adalah :

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

public class tes extends MIDlet implements CommandListener {
    Display D;
    Form fr;
    Command C;
    
    public tes (){
        fr = new Form ("Hello");
        C= new Command ("Keluar", Command.EXIT,0);
        fr.append ("Hai");
        fr.addCommand (C);
        fr.setCommandListener(this);
    }
    public void startApp() {
        D= Display.getDisplay(this);
        D.setCurrent(fr);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }

    public void commandAction(Command arg0, Displayable arg1) {
        if (arg0==C){
            destroyApp(true);
            notifyDestroyed();
        }
        
    }
}