KEMBALI DIALOG

Jumat, 21 Oktober 2011

public class KembaliDialog extends JDialog {

    JButton kembali;
    JLabel Peminjam, NIM, Nama, Alamat, Koleksi, ID_Koleksi, Judul;
    JTextField nim, nama, alamat, idKoleksi, judul;

    public KembaliDialog(Frame owner) {
        super(owner);

        this.setLayout(new GridLayout(5, 1));
        setTitle("Daftar Pinjaman");
        setSize(300, 250);
        setLocation(300, 300);
        setResizable(false);


        Peminjam = new JLabel("PEMINJAM");
        NIM = new JLabel("NIM : ");
        Nama = new JLabel("Nama : ");
        Alamat = new JLabel("Alamat : ");
        Koleksi = new JLabel("KOLEKSI");
        ID_Koleksi = new JLabel("Id Koleksi : ");
        Judul = new JLabel("Judul : ");
        nim = new JTextField(20);
        nama = new JTextField(20);
        alamat = new JTextField(20);
        idKoleksi = new JTextField(20);
        judul = new JTextField(20);

        JPanel panel1 = new JPanel(new FlowLayout());
        panel1.add(Peminjam);
        getContentPane().add(panel1);
        JPanel panel2 = new JPanel(new GridLayout(3, 2));
        panel2.add(Nama);
        panel2.add(nama);
        panel2.add(NIM);
        panel2.add(nim);
        panel2.add(Alamat);
        panel2.add(alamat);
        getContentPane().add(panel2);
        JPanel panel3 = new JPanel(new FlowLayout());
        panel3.add(Koleksi);
        getContentPane().add(panel3);

        JPanel panel4 = new JPanel(new GridLayout(3, 2));
        panel4.add(ID_Koleksi);
        panel4.add(idKoleksi);
        panel4.add(Judul);
        panel4.add(judul);
        getContentPane().add(panel4);

        JPanel panel5 = new JPanel(new GridLayout(20, 20, 20, 20));
        kembali = new JButton("Kembali");
        panel5.add(kembali);
        getContentPane().add(kembali);
    }
}

MAIN KEMBALI DIALOG:
public class KembaliDialogTest {
    public static void main(String[] args) {
        KembaliDialog kembali = new KembaliDialog(new FramePerpus());
        kembali.setVisible(true);
    }
}

Get This Comment Form

0 comment(s):

 
Copyright© 2010 Felisitas Brillianti | Semelekete Weleh Weleh | http://dr214ac.blogspot.com