188 Bet - Online
Sbo Hoki Online
Senior Bola - Agen Bola
Live Score Online
Toto Alpha - Agen Bola   Togel Matrix
Fass Bet Online
Tahun QQ, Agen Bola   dinasti poker online
negara qq online   serba qq online
pemain kasino online   hobi casino online
serba casino online   dewan cash online
Premier 189 online   Indo Live Poker online
Poker Dewa online   Bonanza88 online
FifaQQ online   Bandar 855 online
Sport 855 online   Bandar 855 online
Sport 855 online
Pasang iklan, hanya lewat Contact Us, bukan lewat WA / BBM / Line / Wechat / dll.
Waspada penipuan iklan. Klik di sini untuk melihat daftar penipu.

SHARE MEMBUAT PROGRAM PARKIR SEDERHANA [NETBEAN]

Ozynx

✠ IDEOLOGI MEMORI ✠
Donatur
UG-FR+
Thread Starter
Daftar
18 Apr 2014
Post
-
Like diterima
12.417
Lokasi
SHIBUYA
[HIDE]Proses parkir yang semakin canggih dengan bantuan sistem komputer, memudahkan pemilik untuk memanajemen parkir dengan baik. Selain manajemen parkir yang baik, keamanan dalam parkir terjamin karena kendaraan yang masuk maupun keluar telah tercatat dalam database sistem parkir. Kemudahan ini yang menyebabkan semakin banyak pusat perbelanjaan atau yang lainnya menggunakan sistem komputerisasi untuk memanajemen parkir. Petugas parkir hanya melakukan input no kendaraaan dan jam masuk maka pengunjung akan mendapatkan resi parkir yang nantinya diberikan pada petugas ketika ingin keluar dari area parkir.


STEP BY STEP



1. Buka Java NetBeans
Bukalah Java NetBeans dan selanjutnya buat project baru dengan memilih File > New Project.





2.Buat class dengan cara klik kanan pada package > New > Java class dan buat class dengan nama AplikasiParkirSederhana.





3.Bila class telah dibuat, selanjutnya membuat script pada AplikasiParkirSederhana.

Code:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aplikasi.parkir.sederhana;

/**
 *
 * @author Ozynx.nsp
 */
public class AplikasiParkirSederhana {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Frame_Aplikasi_Parkir Laund = new Frame_Aplikasi_Parkir();
        Laund.setVisible(true);
    }
}



4.Desain frame untuk tampilan program dengan cara klik kanan pada package > New > JFrame Form dengan nama Frame_Aplikasi_Parkir.





5.Lakukan pembuatan desain frame program parkir sedehana seperti berikut ini.





6.Bila desain telah selesai di buat, selanjutnya membuat script java seperti berikut ini.

Code:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aplikasi.parkir.sederhana;

/**
 *
 * @author Ozynx.nsp
 */
public class Frame_Aplikasi_Parkir extends javax.swing.JFrame {

    /**
     * Creates new form Frame_Aplikasi_Parkir
     */
    public Frame_Aplikasi_Parkir() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                        
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        NoKendaraan = new javax.swing.JTextField();
        hargaParkir = new javax.swing.JTextField();
        lamaParkir = new javax.swing.JTextField();
        jamMasuk = new javax.swing.JTextField();
        motor = new javax.swing.JRadioButton();
        Mobil = new javax.swing.JRadioButton();
        jLabel8 = new javax.swing.JLabel();
        totalBayar = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jLabel9 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setName("");

        jLabel1.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jLabel1.setText("Program Parkir Sederhana Serbabebas");

        jLabel2.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        jLabel2.setText("No Kendaraan");

        jLabel3.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        jLabel3.setText("Jam Masuk");

        jLabel4.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        jLabel4.setText("Jenis Kendaraan");

        jLabel5.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        jLabel5.setText("Harga Parkir");

        jLabel7.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        jLabel7.setText("Lama Parkir");

        NoKendaraan.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        NoKendaraan.setName("");
        NoKendaraan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                NoKendaraanActionPerformed(evt);
            }
        });

        hargaParkir.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N

        lamaParkir.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N

        jamMasuk.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        jamMasuk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jamMasukActionPerformed(evt);
            }
        });

        motor.setText("Motor");
        motor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                motorActionPerformed(evt);
            }
        });

        Mobil.setText("Mobil");
        Mobil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MobilActionPerformed(evt);
            }
        });

        jLabel8.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        jLabel8.setText("Total Bayar");

        totalBayar.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        totalBayar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                totalBayarActionPerformed(evt);
            }
        });

        jButton1.setText("Proses");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setText("Clear");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jLabel9.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        jLabel9.setText("Jam");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(36, 36, 36)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addComponent(jLabel4)
                                .addComponent(jLabel5)
                                .addComponent(jLabel7))
                            .addGap(58, 58, 58)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(hargaParkir)
                                .addComponent(NoKendaraan)
                                .addComponent(jamMasuk)
                                .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(motor)
                                            .addGap(18, 18, 18)
                                            .addComponent(Mobil))
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(lamaParkir, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel9)))
                                    .addGap(0, 0, Short.MAX_VALUE))))
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(jLabel8)
                            .addGap(99, 99, 99)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(jButton1)
                                    .addGap(18, 18, 18)
                                    .addComponent(jButton2))
                                .addComponent(totalBayar)))))
                .addContainerGap(23, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(26, 26, 26)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(NoKendaraan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(motor)
                    .addComponent(Mobil))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(hargaParkir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jamMasuk, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lamaParkir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7)
                    .addComponent(jLabel9))
                .addGap(51, 51, 51)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton1)
                    .addComponent(jButton2))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(totalBayar, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8))
                .addContainerGap(33, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>                      

    private void totalBayarActionPerformed(java.awt.event.ActionEvent evt) {                                          
        // TODO add your handling code here:
    }                                        

    private void motorActionPerformed(java.awt.event.ActionEvent evt) {                                    
        // TODO add your handling code here:
         hargaParkir.setText("2000");
         jamMasuk.setText("07.00 WIB");
    }                                    

    private void NoKendaraanActionPerformed(java.awt.event.ActionEvent evt) {                                          
        // TODO add your handling code here:
      
    }                                          

    private void MobilActionPerformed(java.awt.event.ActionEvent evt) {                                    
        // TODO add your handling code here:
        hargaParkir.setText("5000");
        jamMasuk.setText("07.00 WIB");
    }                                    

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        // TODO add your handling code here:
        int c = Integer.parseInt(hargaParkir.getText());
        int d = Integer.parseInt(lamaParkir.getText());
        int hasilnya = c*d;
        totalBayar.setText(""+hasilnya);
    }                                      

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        // TODO add your handling code here:
        NoKendaraan.setText("");
        jamMasuk.setText("");
        lamaParkir.setText("");
        hargaParkir.setText("");
        totalBayar.setText("");
        motor.setSelected(false);
        Mobil.setSelected(false);
        motor.setEnabled(true);
        Mobil.setEnabled(true);
    }                                      

    private void jamMasukActionPerformed(java.awt.event.ActionEvent evt) {                                        
        // TODO add your handling code here:
      
    }                                      

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Frame_Aplikasi_Parkir.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Frame_Aplikasi_Parkir.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Frame_Aplikasi_Parkir.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Frame_Aplikasi_Parkir.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Frame_Aplikasi_Parkir().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify                    
    private javax.swing.JRadioButton Mobil;
    private javax.swing.JTextField NoKendaraan;
    private javax.swing.JTextField hargaParkir;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JTextField jamMasuk;
    private javax.swing.JTextField lamaParkir;
    private javax.swing.JRadioButton motor;
    private javax.swing.JTextField totalBayar;
    // End of variables declaration                  
}



HASIL JADI

VIDEO DEMO

[/HIDE]



:)SELESAI GAN





 
Terakhir diubah:
Indo Sniper
Sbo Hoki Online   Senior Bola Online
Jav Toys Domino168 - Agen Bola
Asia Bet
Asia Win Online
Waspada, pin ini BUKAN pin Forum Semprot :
D005 0B6C

Pasang iklan hanya lewat CONTACT US
Top
Current URL :