Popular Post

Popular Posts

Recent post












Screenshot tampilan program dan bukti pengiriman



untuk mengisi nilai uas kali ini, saya telah menyiapkan program baru namun sudah disempurnakan dari program sebelumnya.
langsung saja :

 ini adalah flowchart untuk login saya

 ini adalah flowchart untuk form registrasi saya

 ini adalah flowchart untuk form admin saya

dan ini adalah flowchart untuk form user saya

Tutorial penggunaan program milik saya :
 Langkah pertama adalah kita akan melakukan login dengan username aldo1 dan passwordnya adalah admin1

setelah masuk, kita akan disuguhkan dengan panel user yang disana terlihat bahwa ada 1 buah user yang bisa login kedalam aplikasi ini yaitu akun yang tadi saya gunakan untuk login.
 berikutnya adalah penggunaan untuk menginput barang-barang yang ada didalam aplikasi ini, saya beri contoh seperti diatas.

 untuk form transaction belum terjadi apa apa karna blm ada user yang melakukan transaksi pada aplikasi ini.


 berikutnya adalah kita kembali kelogin dan memasukkan username serta password baru yang telah kita buat dengan aksesnya sebagai user agar bisa mengakses form user.

 disini sebagai contoh, saya menekan salah satu tombol barang yang saya telah setting isinya dan akan muncul nama product serta harganya secara otomatis.

 setelah kita isikan pembelian dan nama pembelinya, kita tekan tombol hitung lalu sistem akan menghitung sesuai dengan void yang telah saya berikan.


 ini adalah pesan yang keluar jika kita langsung menekan tombol beli dan data yang tadi akan dimasukan kedalam database transaksi kita.

 pada transaksi sendiri akan terisikan data yang telah kita beli tadi seperti gambar diatas

 ini adalah salah satu contoh jika kita memasukan data ini kedalam wishlist atau beli nanti.

didalam wishlist sendiri hanya beberapa data saja yang dapat di inputkan sebelum nanti dapat di proses kebali apakah akan dilanjutkan membeli atau batal.

begitulah sekiranya program yang saya buat kali ini. untuk kodingannya dapat dilihat dibawah ini :

Koneksi.java
/*@author Reinaldo*/
package Koneksi;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Koneksi {
    public static Connection conn;
   
    public static Connection Conn(){
        try{

            Class.forName("com.mysql.jdbc.Driver");
            conn = DriverManager.getConnection("jdbc:mysql://localhost/program_reinaldo","root","");
        }
        catch (ClassNotFoundException | SQLException e){
            System.out.println(e.getMessage());
        }
        return conn;
    }
    public static void main (String [] args){
        System.out.println(Koneksi.Conn());
    }

    public static Connection getConnection() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}

Login.java
/*@author Reinaldo*/
package P1_Login;

import Koneksi.Koneksi;
import java.awt.HeadlessException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;
import P2_Registration.Registrasi;
import P3_Administrator.Administrator;
import P4_User.User;

public class Login extends javax.swing.JFrame {

    Connection conn;
    Statement st;
    ResultSet rs;
    public static int id;
  
    private void Login(){
        try{
            String tname = LoginText1.getText();
            String tpass = LoginText2.getText();
            String sql = "SELECT * FROM login WHERE username ='"+tname+"' AND password =md5('"+tpass+"')";
          
            conn = Koneksi.Conn();
            st = conn.createStatement();
            rs = st.executeQuery(sql);
          
            if (rs.next()){
                if (rs.getInt("status")==1){
                    id = rs.getInt("id_login");
                    String akses = rs.getString("akses");
                    System.out.println(akses);
                    if (akses.equals("Administrator")){
                        Administrator a = new Administrator();
                        a.show();
                    }
                    else if (akses.equals("User")){
                        User p = new User();
                        p.show();
                    }
                  
                JOptionPane.showMessageDialog(null, "Login Berhasil");
            }
                else {
                    JOptionPane.showMessageDialog(null, "maaf akun anda di blokir");
                }
            }else{
                JOptionPane.showMessageDialog(null, "Login gagal");
            }
        }
        catch (HeadlessException | SQLException e){
            System.out.println(e.getMessage());
        }
      
    }
  
    public Login() {
        initComponents();
    }

  
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                        
    private void initComponents() {

        LoginPanel = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        LoginText1 = new javax.swing.JTextField();
        LoginText2 = new javax.swing.JPasswordField();
        LoginBtn1 = new javax.swing.JButton();
        LoginBtn2 = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setUndecorated(true);

        LoginPanel.setBackground(new java.awt.Color(0, 51, 51));
        LoginPanel.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(204, 255, 255)));

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(240, 240, 240));
        jLabel1.setText("Login Form");

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(240, 240, 240));
        jLabel2.setText("Username");

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(240, 240, 240));
        jLabel3.setText("Password");
        jLabel3.setToolTipText("");

        LoginBtn1.setText("Login");
        LoginBtn1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                LoginBtn1ActionPerformed(evt);
            }
        });

        LoginBtn2.setText("Exit");
        LoginBtn2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                LoginBtn2ActionPerformed(evt);
            }
        });

        jLabel4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel4.setForeground(new java.awt.Color(240, 240, 240));
        jLabel4.setText("Klik");

        jLabel5.setBackground(new java.awt.Color(255, 255, 255));
        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel5.setForeground(new java.awt.Color(204, 204, 255));
        jLabel5.setText("Disini");
        jLabel5.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel5MouseClicked(evt);
            }
        });

        jLabel6.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(240, 240, 240));
        jLabel6.setText("Untuk Melakukan Registrasi");

        javax.swing.GroupLayout LoginPanelLayout = new javax.swing.GroupLayout(LoginPanel);
        LoginPanel.setLayout(LoginPanelLayout);
        LoginPanelLayout.setHorizontalGroup(
            LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(LoginPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addGroup(LoginPanelLayout.createSequentialGroup()
                        .addGroup(LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3))
                        .addGap(18, 18, 18)
                        .addGroup(LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(LoginPanelLayout.createSequentialGroup()
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel5)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel6)
                                .addGap(0, 32, Short.MAX_VALUE))
                            .addGroup(LoginPanelLayout.createSequentialGroup()
                                .addComponent(LoginBtn1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(LoginBtn2))
                            .addComponent(LoginText2)
                            .addComponent(LoginText1))))
                .addGap(18, 18, 18))
        );
        LoginPanelLayout.setVerticalGroup(
            LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(LoginPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(68, 68, 68)
                .addGroup(LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(LoginText1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(25, 25, 25)
                .addGroup(LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(LoginText2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(LoginBtn1)
                    .addComponent(LoginBtn2))
                .addGap(48, 48, 48)
                .addGroup(LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(jLabel5)
                    .addComponent(jLabel6))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(LoginPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(LoginPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

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

    private void LoginBtn1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        Login();
    }                                       

    private void LoginBtn2ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        System.exit(0);
    }                                       

    private void jLabel5MouseClicked(java.awt.event.MouseEvent evt) {                                   
        new Registrasi().setVisible(true);
    }                                  

  
    public static void main(String args[]) {
      
        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(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Login.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 Login().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify                   
    private javax.swing.JButton LoginBtn1;
    private javax.swing.JButton LoginBtn2;
    private javax.swing.JPanel LoginPanel;
    private javax.swing.JTextField LoginText1;
    private javax.swing.JPasswordField LoginText2;
    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 jLabel6;
    // End of variables declaration                 
}

Registrasi.java
/*@author Reinaldo*/
package P2_Registration;

import Koneksi.Koneksi;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import P1_Login.Login;

public class Registrasi extends javax.swing.JFrame {

    Connection conn = Koneksi.Conn();
    Statement st;
    ResultSet rs;
   
   
    private void ClearRegistration(){
        RegisText1.setText("");
        RegisText2.setText("");
        RegisText3.setText("");
        RegisText4.setText("");
        RegisText5.setText("");
    }
    public Registrasi() {
        initComponents();
    }

   
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                         
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        RegistraionLabel = new javax.swing.JLabel();
        RegistraionLabel1 = new javax.swing.JLabel();
        RegistraionLabel2 = new javax.swing.JLabel();
        RegistraionLabel3 = new javax.swing.JLabel();
        RegistraionLabel4 = new javax.swing.JLabel();
        RegistraionLabel5 = new javax.swing.JLabel();
        RegisText1 = new javax.swing.JTextField();
        RegisText2 = new javax.swing.JTextField();
        RegisText3 = new javax.swing.JTextField();
        RegisText4 = new javax.swing.JTextField();
        RegisText5 = new javax.swing.JTextField();
        RegisBtn1 = new javax.swing.JButton();
        RegisBtn2 = new javax.swing.JButton();
        RegisBtn3 = new javax.swing.JButton();
        RegistraionLabel6 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setUndecorated(true);
        getContentPane().setLayout(new java.awt.CardLayout());

        jPanel1.setBackground(new java.awt.Color(0, 51, 51));
        jPanel1.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(204, 255, 255)));

        RegistraionLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RegistraionLabel.setForeground(new java.awt.Color(240, 240, 240));
        RegistraionLabel.setText("Registration Form");

        RegistraionLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RegistraionLabel1.setForeground(new java.awt.Color(240, 240, 240));
        RegistraionLabel1.setText("Nama");

        RegistraionLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RegistraionLabel2.setForeground(new java.awt.Color(240, 240, 240));
        RegistraionLabel2.setText("No Tlp");

        RegistraionLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RegistraionLabel3.setForeground(new java.awt.Color(240, 240, 240));
        RegistraionLabel3.setText("Email");

        RegistraionLabel4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RegistraionLabel4.setForeground(new java.awt.Color(240, 240, 240));
        RegistraionLabel4.setText("Nickname");

        RegistraionLabel5.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RegistraionLabel5.setForeground(new java.awt.Color(240, 240, 240));
        RegistraionLabel5.setText("Password");

        RegisBtn1.setText("Daftar");
        RegisBtn1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RegisBtn1ActionPerformed(evt);
            }
        });

        RegisBtn2.setText("Batal");
        RegisBtn2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RegisBtn2ActionPerformed(evt);
            }
        });

        RegisBtn3.setText("Keluar");
        RegisBtn3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RegisBtn3ActionPerformed(evt);
            }
        });

        RegistraionLabel6.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RegistraionLabel6.setForeground(new java.awt.Color(240, 240, 240));
        RegistraionLabel6.setText("Kembali Ke Halaman Login");
        RegistraionLabel6.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                RegistraionLabel6MouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(RegistraionLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(RegistraionLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(RegistraionLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(RegistraionLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(RegistraionLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(RegistraionLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(RegisBtn1)
                        .addGap(40, 40, 40)
                        .addComponent(RegisBtn2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(RegisBtn3))
                    .addComponent(RegisText1, javax.swing.GroupLayout.PREFERRED_SIZE, 278, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(RegisText2, javax.swing.GroupLayout.PREFERRED_SIZE, 278, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(RegisText3, javax.swing.GroupLayout.PREFERRED_SIZE, 278, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(RegisText4, javax.swing.GroupLayout.PREFERRED_SIZE, 278, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(RegisText5, javax.swing.GroupLayout.PREFERRED_SIZE, 278, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(RegistraionLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(23, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(RegistraionLabel)
                .addGap(49, 49, 49)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(RegistraionLabel1)
                    .addComponent(RegisText1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(RegistraionLabel2)
                    .addComponent(RegisText2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(RegistraionLabel3)
                    .addComponent(RegisText3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(RegistraionLabel4)
                    .addComponent(RegisText4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(RegistraionLabel5)
                    .addComponent(RegisText5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(RegisBtn1)
                    .addComponent(RegisBtn2)
                    .addComponent(RegisBtn3))
                .addGap(41, 41, 41)
                .addComponent(RegistraionLabel6)
                .addContainerGap(51, Short.MAX_VALUE))
        );

        getContentPane().add(jPanel1, "card2");

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

    private void RegisBtn1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        try{
            String sql = "INSERT INTO Login VALUES (null, '"+RegisText1.getText()+"', '"+RegisText2.getText()+"','"+RegisText3.getText()+"','"+RegisText4.getText()+"', MD5('"+RegisText5.getText()+"'), 'User', '1')";
            st = conn.createStatement();
            st.executeUpdate(sql);
           
        }catch (SQLException e){
            System.out.println(e.getMessage());
        }
    }                                        

    private void RegisBtn2ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        ClearRegistration();
    }                                        

    private void RegisBtn3ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        System.exit(0);
    }                                        

    private void RegistraionLabel6MouseClicked(java.awt.event.MouseEvent evt) {                                              
        new Login().setVisible(true);
    }                                             

   
    public static void main(String args[]) {
       
        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(Registrasi.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Registrasi.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Registrasi.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Registrasi.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
       
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Registrasi().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify                    
    private javax.swing.JButton RegisBtn1;
    private javax.swing.JButton RegisBtn2;
    private javax.swing.JButton RegisBtn3;
    private javax.swing.JTextField RegisText1;
    private javax.swing.JTextField RegisText2;
    private javax.swing.JTextField RegisText3;
    private javax.swing.JTextField RegisText4;
    private javax.swing.JTextField RegisText5;
    private javax.swing.JLabel RegistraionLabel;
    private javax.swing.JLabel RegistraionLabel1;
    private javax.swing.JLabel RegistraionLabel2;
    private javax.swing.JLabel RegistraionLabel3;
    private javax.swing.JLabel RegistraionLabel4;
    private javax.swing.JLabel RegistraionLabel5;
    private javax.swing.JLabel RegistraionLabel6;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration                  
}

Administrator.java
/*@author Reinaldo*/
package P3_Administrator;

import Koneksi.Koneksi;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;

public class Administrator extends javax.swing.JFrame {

    Connection conn = Koneksi.Conn();
    Statement st;
    ResultSet rs;
  
    private void ViewUser(){
        DefaultTableModel model = new DefaultTableModel();
      
        model.addColumn("id_login");
        model.addColumn("Nama");
        model.addColumn("No_Telp");
        model.addColumn("Email");
        model.addColumn("username");
        model.addColumn("Password");
        model.addColumn("Akses");
        model.addColumn("Status");
      
        try{
            String sql = "SELECT * FROM Login";
            st = conn.createStatement();
            rs = st.executeQuery(sql);
          
          
            while(rs.next()){
              
                model.addRow(new Object []{
                rs.getString("id_login"),
                rs.getString("Nama"),
                rs.getString("No_Telp"),
                rs.getString("Email"),
                rs.getString("username"),
                rs.getString("Password"),
                rs.getString("Akses"),
                rs.getString("Status")
                });
            }
            UserTable.setModel(model);
          
        }catch(SQLException e){
            System.out.println(e.getMessage());
        }
    }
  
    private void ViewProduct(){
        DefaultTableModel model = new DefaultTableModel();
      
        model.addColumn("ID_Product");
        model.addColumn("Nama_Product");
        model.addColumn("Harga");
      
        try{
            String sql = "SELECT * FROM Product";
            st = conn.createStatement();
            rs = st.executeQuery(sql);
          
          
            while(rs.next()){
              
                model.addRow(new Object []{
                rs.getString("ID_Product"),
                rs.getString("Nama_Product"),
                rs.getString("Harga")
                });
            }
            ProductTable.setModel(model);
          
        }catch(SQLException e){
            System.out.println(e.getMessage());
        }
    }
  
    private void ViewTransaction(){
        DefaultTableModel model = new DefaultTableModel();
      
        model.addColumn("ID_Transaction");
        model.addColumn("Pembeli");
        model.addColumn("Nama_Product");
        model.addColumn("Harga");
        model.addColumn("Jumlah_Pembelian");
        model.addColumn("Hasil");
        model.addColumn("Diskon");
        model.addColumn("Total");
      
        try{
            String sql = "SELECT * FROM Transaction";
            st = conn.createStatement();
            rs = st.executeQuery(sql);
          
          
            while(rs.next()){
              
                model.addRow(new Object []{
                rs.getString("ID_Transaction"),
                rs.getString("Pembeli"),
                rs.getString("Nama_Product"),
                rs.getString("Harga"),
                rs.getString("Jumlah_Pembelian"),
                rs.getString("Hasil"),
                rs.getString("Diskon"),
                rs.getString("Total")
                });
            }
            TransactionTable.setModel(model);
          
        }catch(SQLException e){
            System.out.println(e.getMessage());
        }
    }
  
    private void BersihUser(){
        UserText1.setText("");
        UserText2.setText("");
        UserText3.setText("");
        UserText4.setText("");
        UserText5.setText("");
        UserText6.setText("");
        UserText7.setText("");
        UserText8.setText("");
        UserArea.setText("");
    }
  
    private void BersihProduct(){
        ProductText1.setText("");
        ProductText2.setText("");
        ProductText3.setText("");
        ProductArea.setText("");
    }
  
    private void BersihTransaction(){
        TransactionText1.setText("");
        TransactionText2.setText("");
        TransactionText3.setText("");
        TransactionText4.setText("");
        TransactionText5.setText("");
        TransactionText6.setText("");
        TransactionText7.setText("");
        TransactionText8.setText("");
        TransactionArea.setText("");
    }
  
    public Administrator() {
        initComponents();
  
        UserGroup.add(URadioButton1);
        UserGroup.add(URadioButton2);
        UserGroup.add(URadioButton3);
        UserGroup.add(URadioButton4);
    }

  
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                        
    private void initComponents() {

        UserGroup = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        User = new javax.swing.JPanel();
        UserLabel = new javax.swing.JLabel();
        UserSP1 = new javax.swing.JScrollPane();
        UserTable = new javax.swing.JTable();
        UserSP2 = new javax.swing.JScrollPane();
        UserPanel = new javax.swing.JPanel();
        UserLabel1 = new javax.swing.JLabel();
        UserLabel2 = new javax.swing.JLabel();
        UserLabel3 = new javax.swing.JLabel();
        UserLabel4 = new javax.swing.JLabel();
        UserLabel5 = new javax.swing.JLabel();
        UserLabel6 = new javax.swing.JLabel();
        UserLabel7 = new javax.swing.JLabel();
        UserLabel8 = new javax.swing.JLabel();
        UserText1 = new javax.swing.JTextField();
        UserText2 = new javax.swing.JTextField();
        UserText3 = new javax.swing.JTextField();
        UserText4 = new javax.swing.JTextField();
        UserText5 = new javax.swing.JTextField();
        UserText6 = new javax.swing.JTextField();
        UserText7 = new javax.swing.JTextField();
        UserText8 = new javax.swing.JTextField();
        UserSP3 = new javax.swing.JScrollPane();
        UserArea = new javax.swing.JTextArea();
        UserBtn1 = new javax.swing.JButton();
        UserBtn2 = new javax.swing.JButton();
        UserBtn3 = new javax.swing.JButton();
        UserBtn4 = new javax.swing.JButton();
        URadioButton1 = new javax.swing.JRadioButton();
        URadioButton2 = new javax.swing.JRadioButton();
        URadioButton3 = new javax.swing.JRadioButton();
        URadioButton4 = new javax.swing.JRadioButton();
        Product = new javax.swing.JPanel();
        ProductLabel = new javax.swing.JLabel();
        ProductSP1 = new javax.swing.JScrollPane();
        ProductTable = new javax.swing.JTable();
        ProductSP2 = new javax.swing.JScrollPane();
        ProductPanel = new javax.swing.JPanel();
        ProductLabel1 = new javax.swing.JLabel();
        ProductLabel2 = new javax.swing.JLabel();
        ProductLabel3 = new javax.swing.JLabel();
        ProductText1 = new javax.swing.JTextField();
        ProductText2 = new javax.swing.JTextField();
        ProductText3 = new javax.swing.JTextField();
        ProductSP3 = new javax.swing.JScrollPane();
        ProductArea = new javax.swing.JTextArea();
        ProductBtn1 = new javax.swing.JButton();
        ProductBtn2 = new javax.swing.JButton();
        ProductBtn3 = new javax.swing.JButton();
        ProductBtn4 = new javax.swing.JButton();
        Transaction = new javax.swing.JPanel();
        TransactionLabel = new javax.swing.JLabel();
        TransactionSP1 = new javax.swing.JScrollPane();
        TransactionTable = new javax.swing.JTable();
        TransactionSP2 = new javax.swing.JScrollPane();
        TransactionPanel = new javax.swing.JPanel();
        TransactionLabel1 = new javax.swing.JLabel();
        TransactionLabel2 = new javax.swing.JLabel();
        TransactionLabel3 = new javax.swing.JLabel();
        TransactionLabel4 = new javax.swing.JLabel();
        TransactionLabel5 = new javax.swing.JLabel();
        TransactionLabel6 = new javax.swing.JLabel();
        TransactionLabel7 = new javax.swing.JLabel();
        TransactionLabel8 = new javax.swing.JLabel();
        TransactionText1 = new javax.swing.JTextField();
        TransactionText2 = new javax.swing.JTextField();
        TransactionText3 = new javax.swing.JTextField();
        TransactionText4 = new javax.swing.JTextField();
        TransactionText5 = new javax.swing.JTextField();
        TransactionText6 = new javax.swing.JTextField();
        TransactionText7 = new javax.swing.JTextField();
        TransactionText8 = new javax.swing.JTextField();
        TransactionSP3 = new javax.swing.JScrollPane();
        TransactionArea = new javax.swing.JTextArea();
        TransactionBtn1 = new javax.swing.JButton();
        TransactionBtn2 = new javax.swing.JButton();
        TransactionBtn3 = new javax.swing.JButton();
        TransactionBtn4 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setUndecorated(true);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });
        getContentPane().setLayout(new java.awt.CardLayout());

        jPanel1.setBackground(new java.awt.Color(0, 0, 153));
        jPanel1.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(204, 255, 255)));

        jLabel1.setForeground(new java.awt.Color(240, 240, 240));
        jLabel1.setText("Admin Form");

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

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

        jButton3.setText("Transaction");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jButton4.setText("Exit");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        jPanel2.setBackground(new java.awt.Color(0, 0, 153));
        jPanel2.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(102, 102, 255)));
        jPanel2.setLayout(new java.awt.CardLayout());

        User.setBackground(new java.awt.Color(0, 102, 102));
        User.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(102, 102, 255)));

        UserLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        UserLabel.setForeground(new java.awt.Color(240, 240, 240));
        UserLabel.setText("User Page");

        UserTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "id_login", "nama", "no_telp", "email", "nickname", "password", "akses", "status"
            }
        ));
        UserTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                UserTableMouseClicked(evt);
            }
        });
        UserSP1.setViewportView(UserTable);

        UserPanel.setBackground(new java.awt.Color(102, 0, 0));
        UserPanel.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(255, 153, 153)));

        UserLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        UserLabel1.setForeground(new java.awt.Color(240, 240, 240));
        UserLabel1.setText("ID Login");

        UserLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        UserLabel2.setForeground(new java.awt.Color(240, 240, 240));
        UserLabel2.setText("Nama");

        UserLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        UserLabel3.setForeground(new java.awt.Color(240, 240, 240));
        UserLabel3.setText("No Telp");

        UserLabel4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        UserLabel4.setForeground(new java.awt.Color(240, 240, 240));
        UserLabel4.setText("Email");

        UserLabel5.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        UserLabel5.setForeground(new java.awt.Color(240, 240, 240));
        UserLabel5.setText("Nickname");

        UserLabel6.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        UserLabel6.setForeground(new java.awt.Color(240, 240, 240));
        UserLabel6.setText("Password");

        UserLabel7.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        UserLabel7.setForeground(new java.awt.Color(240, 240, 240));
        UserLabel7.setText("Akses");

        UserLabel8.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        UserLabel8.setForeground(new java.awt.Color(240, 240, 240));
        UserLabel8.setText("Status");

        UserText1.setEditable(false);

        UserArea.setEditable(false);
        UserArea.setColumns(20);
        UserArea.setRows(5);
        UserSP3.setViewportView(UserArea);

        UserBtn1.setText("Save");
        UserBtn1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                UserBtn1ActionPerformed(evt);
            }
        });

        UserBtn2.setText("Edit");
        UserBtn2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                UserBtn2ActionPerformed(evt);
            }
        });

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

        UserBtn4.setText("Delete");
        UserBtn4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                UserBtn4ActionPerformed(evt);
            }
        });

        URadioButton1.setText("Administrator");
        URadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                URadioButton1ActionPerformed(evt);
            }
        });

        URadioButton2.setText("User");
        URadioButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                URadioButton2ActionPerformed(evt);
            }
        });

        URadioButton3.setText("0");
        URadioButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                URadioButton3ActionPerformed(evt);
            }
        });

        URadioButton4.setText("1");
        URadioButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                URadioButton4ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout UserPanelLayout = new javax.swing.GroupLayout(UserPanel);
        UserPanel.setLayout(UserPanelLayout);
        UserPanelLayout.setHorizontalGroup(
            UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(UserPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(UserPanelLayout.createSequentialGroup()
                        .addComponent(UserLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(UserText1))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, UserPanelLayout.createSequentialGroup()
                        .addComponent(UserLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(UserText2))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, UserPanelLayout.createSequentialGroup()
                        .addComponent(UserLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(UserText3))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, UserPanelLayout.createSequentialGroup()
                        .addComponent(UserLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(UserText4))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, UserPanelLayout.createSequentialGroup()
                        .addComponent(UserLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(UserText5))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, UserPanelLayout.createSequentialGroup()
                        .addComponent(UserLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(UserText6))
                    .addGroup(UserPanelLayout.createSequentialGroup()
                        .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(UserPanelLayout.createSequentialGroup()
                                .addComponent(UserLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(URadioButton1))
                            .addGroup(UserPanelLayout.createSequentialGroup()
                                .addComponent(UserLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(URadioButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                        .addGap(18, 18, 18)
                        .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(URadioButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE)
                            .addComponent(URadioButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(UserText8, javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE)
                            .addComponent(UserText7))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(UserPanelLayout.createSequentialGroup()
                        .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(UserBtn1, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(UserBtn3))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(UserBtn4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(UserBtn2, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(UserSP3, javax.swing.GroupLayout.PREFERRED_SIZE, 339, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        UserPanelLayout.setVerticalGroup(
            UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(UserPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(UserSP3, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, UserPanelLayout.createSequentialGroup()
                        .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(UserLabel1)
                            .addComponent(UserText1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(UserLabel2)
                            .addComponent(UserText2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(UserLabel3)
                            .addComponent(UserText3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(UserLabel4)
                            .addComponent(UserText4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(UserLabel5)
                            .addComponent(UserText5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(UserLabel6)
                            .addComponent(UserText6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(UserLabel7)
                            .addComponent(URadioButton1)
                            .addComponent(URadioButton2)
                            .addComponent(UserText7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(UserLabel8)
                            .addComponent(UserText8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(URadioButton3)
                            .addComponent(URadioButton4))))
                .addGap(18, 18, 18)
                .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(UserBtn1)
                    .addComponent(UserBtn2))
                .addGap(18, 18, 18)
                .addGroup(UserPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(UserBtn3)
                    .addComponent(UserBtn4))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        UserSP2.setViewportView(UserPanel);

        javax.swing.GroupLayout UserLayout = new javax.swing.GroupLayout(User);
        User.setLayout(UserLayout);
        UserLayout.setHorizontalGroup(
            UserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, UserLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(UserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(UserSP2, javax.swing.GroupLayout.DEFAULT_SIZE, 708, Short.MAX_VALUE)
                    .addComponent(UserSP1, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, UserLayout.createSequentialGroup()
                        .addComponent(UserLabel)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        UserLayout.setVerticalGroup(
            UserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(UserLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(UserLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(UserSP1, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(UserSP2, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel2.add(User, "card2");

        Product.setBackground(new java.awt.Color(0, 102, 102));
        Product.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(102, 153, 255)));

        ProductLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        ProductLabel.setForeground(new java.awt.Color(240, 240, 240));
        ProductLabel.setText("Product Page");

        ProductTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "ID_Product", "Nama_Product", "Harga"
            }
        ));
        ProductTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                ProductTableMouseClicked(evt);
            }
        });
        ProductSP1.setViewportView(ProductTable);

        ProductPanel.setBackground(new java.awt.Color(102, 0, 102));
        ProductPanel.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(255, 204, 255)));

        ProductLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        ProductLabel1.setForeground(new java.awt.Color(240, 240, 240));
        ProductLabel1.setText("ID Product");

        ProductLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        ProductLabel2.setForeground(new java.awt.Color(240, 240, 240));
        ProductLabel2.setText("Nama Product");

        ProductLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        ProductLabel3.setForeground(new java.awt.Color(240, 240, 240));
        ProductLabel3.setText("Harga");

        ProductArea.setColumns(20);
        ProductArea.setRows(5);
        ProductSP3.setViewportView(ProductArea);

        ProductBtn1.setText("Save");
        ProductBtn1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ProductBtn1ActionPerformed(evt);
            }
        });

        ProductBtn2.setText("Edit");
        ProductBtn2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ProductBtn2ActionPerformed(evt);
            }
        });

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

        ProductBtn4.setText("Delete");
        ProductBtn4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ProductBtn4ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout ProductPanelLayout = new javax.swing.GroupLayout(ProductPanel);
        ProductPanel.setLayout(ProductPanelLayout);
        ProductPanelLayout.setHorizontalGroup(
            ProductPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ProductPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(ProductPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(ProductLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(ProductLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(ProductLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(ProductPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(ProductPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(ProductText1, javax.swing.GroupLayout.PREFERRED_SIZE, 321, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(ProductText2, javax.swing.GroupLayout.PREFERRED_SIZE, 321, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(ProductText3, javax.swing.GroupLayout.PREFERRED_SIZE, 321, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(ProductPanelLayout.createSequentialGroup()
                        .addGroup(ProductPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(ProductBtn3, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ProductBtn1, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(103, 103, 103)
                        .addGroup(ProductPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(ProductBtn2, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ProductBtn4, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(18, 18, 18)
                .addComponent(ProductSP3, javax.swing.GroupLayout.DEFAULT_SIZE, 237, Short.MAX_VALUE)
                .addContainerGap())
        );
        ProductPanelLayout.setVerticalGroup(
            ProductPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ProductPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(ProductPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(ProductSP3, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, ProductPanelLayout.createSequentialGroup()
                        .addGroup(ProductPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ProductLabel1)
                            .addComponent(ProductText1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(ProductPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ProductLabel2)
                            .addComponent(ProductText2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(ProductPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ProductLabel3)
                            .addComponent(ProductText3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(18, 18, 18)
                .addGroup(ProductPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(ProductBtn1)
                    .addComponent(ProductBtn2))
                .addGap(33, 33, 33)
                .addGroup(ProductPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ProductBtn3)
                    .addComponent(ProductBtn4))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        ProductSP2.setViewportView(ProductPanel);

        javax.swing.GroupLayout ProductLayout = new javax.swing.GroupLayout(Product);
        Product.setLayout(ProductLayout);
        ProductLayout.setHorizontalGroup(
            ProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ProductLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(ProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(ProductSP2, javax.swing.GroupLayout.DEFAULT_SIZE, 708, Short.MAX_VALUE)
                    .addComponent(ProductSP1, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, ProductLayout.createSequentialGroup()
                        .addComponent(ProductLabel)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        ProductLayout.setVerticalGroup(
            ProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ProductLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(ProductLabel)
                .addGap(18, 18, 18)
                .addComponent(ProductSP1, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(ProductSP2, javax.swing.GroupLayout.DEFAULT_SIZE, 235, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel2.add(Product, "card3");

        Transaction.setBackground(new java.awt.Color(102, 102, 0));
        Transaction.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(255, 255, 153)));

        TransactionLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        TransactionLabel.setForeground(new java.awt.Color(240, 240, 240));
        TransactionLabel.setText("Transaction Page");

        TransactionTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "ID_Transaksi", "Pembeli", "Nama_Product", "Harga", "Jumlah_Pembelian", "Hasil", "Diskon", "Total"
            }
        ));
        TransactionTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                TransactionTableMouseClicked(evt);
            }
        });
        TransactionSP1.setViewportView(TransactionTable);

        TransactionPanel.setBackground(new java.awt.Color(204, 204, 0));
        TransactionPanel.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(255, 255, 102)));

        TransactionLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        TransactionLabel1.setForeground(new java.awt.Color(240, 240, 240));
        TransactionLabel1.setText("ID Transaksi");

        TransactionLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        TransactionLabel2.setForeground(new java.awt.Color(240, 240, 240));
        TransactionLabel2.setText("Pembeli");

        TransactionLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        TransactionLabel3.setForeground(new java.awt.Color(240, 240, 240));
        TransactionLabel3.setText("Nama Product");

        TransactionLabel4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        TransactionLabel4.setForeground(new java.awt.Color(240, 240, 240));
        TransactionLabel4.setText("Harga");

        TransactionLabel5.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        TransactionLabel5.setForeground(new java.awt.Color(240, 240, 240));
        TransactionLabel5.setText("Jumlah Pembelian");

        TransactionLabel6.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        TransactionLabel6.setForeground(new java.awt.Color(240, 240, 240));
        TransactionLabel6.setText("Hasil");

        TransactionLabel7.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        TransactionLabel7.setForeground(new java.awt.Color(240, 240, 240));
        TransactionLabel7.setText("Diskon");

        TransactionLabel8.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        TransactionLabel8.setForeground(new java.awt.Color(240, 240, 240));
        TransactionLabel8.setText("Total");

        TransactionArea.setColumns(20);
        TransactionArea.setRows(5);
        TransactionSP3.setViewportView(TransactionArea);

        TransactionBtn1.setText("Save");
        TransactionBtn1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TransactionBtn1ActionPerformed(evt);
            }
        });

        TransactionBtn2.setText("Edit");
        TransactionBtn2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TransactionBtn2ActionPerformed(evt);
            }
        });

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

        TransactionBtn4.setText("Delete");
        TransactionBtn4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TransactionBtn4ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout TransactionPanelLayout = new javax.swing.GroupLayout(TransactionPanel);
        TransactionPanel.setLayout(TransactionPanelLayout);
        TransactionPanelLayout.setHorizontalGroup(
            TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TransactionPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TransactionPanelLayout.createSequentialGroup()
                        .addComponent(TransactionLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(TransactionText4, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(TransactionPanelLayout.createSequentialGroup()
                        .addComponent(TransactionLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(TransactionText5, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(TransactionPanelLayout.createSequentialGroup()
                        .addComponent(TransactionLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(TransactionText6, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(TransactionPanelLayout.createSequentialGroup()
                        .addComponent(TransactionLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(TransactionText7, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(TransactionPanelLayout.createSequentialGroup()
                        .addComponent(TransactionLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(TransactionText8, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(TransactionPanelLayout.createSequentialGroup()
                        .addComponent(TransactionLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(TransactionText1, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(TransactionPanelLayout.createSequentialGroup()
                        .addComponent(TransactionLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(TransactionText2, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(TransactionPanelLayout.createSequentialGroup()
                        .addComponent(TransactionLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(TransactionText3, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addGroup(TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TransactionPanelLayout.createSequentialGroup()
                        .addComponent(TransactionBtn3, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)
                        .addComponent(TransactionBtn4, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(TransactionSP3)
                    .addGroup(TransactionPanelLayout.createSequentialGroup()
                        .addComponent(TransactionBtn1, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(TransactionBtn2, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        TransactionPanelLayout.setVerticalGroup(
            TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TransactionPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(TransactionSP3, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TransactionPanelLayout.createSequentialGroup()
                        .addGroup(TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TransactionLabel1)
                            .addComponent(TransactionText1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TransactionLabel2)
                            .addComponent(TransactionText2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TransactionLabel3)
                            .addComponent(TransactionText3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TransactionLabel4)
                            .addComponent(TransactionText4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TransactionLabel5)
                            .addComponent(TransactionText5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TransactionLabel6)
                            .addComponent(TransactionText6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TransactionLabel7)
                            .addComponent(TransactionText7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TransactionLabel8)
                            .addComponent(TransactionText8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(18, 18, 18)
                .addGroup(TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TransactionBtn1)
                    .addComponent(TransactionBtn2))
                .addGap(18, 18, 18)
                .addGroup(TransactionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TransactionBtn3)
                    .addComponent(TransactionBtn4))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        TransactionSP2.setViewportView(TransactionPanel);

        javax.swing.GroupLayout TransactionLayout = new javax.swing.GroupLayout(Transaction);
        Transaction.setLayout(TransactionLayout);
        TransactionLayout.setHorizontalGroup(
            TransactionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TransactionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TransactionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(TransactionSP2, javax.swing.GroupLayout.DEFAULT_SIZE, 708, Short.MAX_VALUE)
                    .addComponent(TransactionSP1, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TransactionLayout.createSequentialGroup()
                        .addComponent(TransactionLabel)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        TransactionLayout.setVerticalGroup(
            TransactionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TransactionLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TransactionLabel)
                .addGap(18, 18, 18)
                .addComponent(TransactionSP1, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(TransactionSP2, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel2.add(Transaction, "card4");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel1)
                    .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(83, 83, 83)
                .addComponent(jButton1)
                .addGap(18, 18, 18)
                .addComponent(jButton2)
                .addGap(18, 18, 18)
                .addComponent(jButton3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jButton4)
                .addContainerGap())
        );

        getContentPane().add(jPanel1, "card2");

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

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                       
        jPanel2.removeAll();
        jPanel2.repaint();
        jPanel2.revalidate();      
        jPanel2.add(User);
        jPanel2.repaint();
        jPanel2.revalidate();
    }                                      

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                       
        jPanel2.removeAll();
        jPanel2.repaint();
        jPanel2.revalidate();      
        jPanel2.add(Product);
        jPanel2.repaint();
        jPanel2.revalidate();
    }                                      

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                       
        jPanel2.removeAll();
        jPanel2.repaint();
        jPanel2.revalidate();      
        jPanel2.add(Transaction);
        jPanel2.repaint();
        jPanel2.revalidate();
    }                                      

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                       
        System.exit(0);
    }                                      

    private void formWindowOpened(java.awt.event.WindowEvent evt) {                                
        ViewUser();
    }                               

    private void UserTableMouseClicked(java.awt.event.MouseEvent evt) {                                     
        int user = UserTable.getSelectedRow();
        UserText1.setText(UserTable.getModel().getValueAt(user, 0).toString());
        UserText2.setText(UserTable.getModel().getValueAt(user, 1).toString());
        UserText3.setText(UserTable.getModel().getValueAt(user, 2).toString());
        UserText4.setText(UserTable.getModel().getValueAt(user, 3).toString());
        UserText5.setText(UserTable.getModel().getValueAt(user, 4).toString());
        UserText6.setText(UserTable.getModel().getValueAt(user, 5).toString());
        UserText7.setText(UserTable.getModel().getValueAt(user, 6).toString());
        UserText8.setText(UserTable.getModel().getValueAt(user, 7).toString());
    }                                    

    private void UserBtn1ActionPerformed(java.awt.event.ActionEvent evt) {                                       
        try{
            String sql = "INSERT INTO Login VALUES (null,'"+UserText2.getText()+"','"+UserText3.getText()+"','"+UserText4.getText()+"',MD5('"+UserText5.getText()+"'),'"+UserText6.getText()+"','"+UserText7.getText()+"','"+UserText8.getText()+"')";
            st = conn.createStatement();
            st.executeUpdate(sql);
          
            ViewUser();
        }catch (SQLException e){
            System.out.println(e.getMessage());
        }
      
        String a, b, c, d, e, f, g, h, i, j, k;
        a = UserText1.getText();
        b = UserText2.getText();
        c = UserText3.getText();
        d = UserText4.getText();
        e = UserText5.getText();
        f = UserText6.getText();
        g = UserText7.getText();
        h = UserText8.getText();
      
        UserArea.setText(UserArea.getText()+"ID Login   : "+a+"\nNAMA   : "+b+"\nNo Telp    : "+c+"\nEmail    : "+d+"\nNickname    : "+e+"\nPassword   : "+f+"\nAkses     : "+g+"\nStatus    : "+h);
      
        JOptionPane.showMessageDialog(this,"Data Telah Di Save");
    }                                      

    private void UserBtn2ActionPerformed(java.awt.event.ActionEvent evt) {                                       
        try{
            String sql = "UPDATE Login SET nama = '"+UserText2.getText()+"', No_Telp  = '"+UserText3.getText()+"', Email = '"+UserText4.getText()+"', Nickname = '"+UserText5.getText()+"', Password = MD5('"+UserText6.getText()+"'), Akses = '"+UserText7.getText()+"', Status = '"+UserText8.getText()+"'";
            st = conn.createStatement();
            st.executeUpdate(sql);
          
            ViewUser();
        }catch (SQLException e){
            System.out.println(e.getMessage());
        }
        JOptionPane.showMessageDialog(this,"Data Telah Di Edit");
    }                                      

    private void UserBtn3ActionPerformed(java.awt.event.ActionEvent evt) {                                       
        BersihUser();
        JOptionPane.showMessageDialog(this,"Text Field Telah Dibersihkan");
    }                                      

    private void UserBtn4ActionPerformed(java.awt.event.ActionEvent evt) {                                       
        try{
            String sql = "DELETE FROM Login WHERE ID_Login = '"+UserText1.getText()+"'";
            st = conn.createStatement();
            st.executeUpdate(sql);
          
            ViewUser();
        }catch (SQLException e){
            System.out.println(e.getMessage());
        }
        JOptionPane.showMessageDialog(this,"Data Telah Di Delete");
    }                                      

    private void URadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                            
        UserText7.setText("Administrator");
    }                                           

    private void URadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                            
        UserText7.setText("User");
    }                                           

    private void URadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                            
        UserText8.setText("0");
    }                                           

    private void URadioButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                            
        UserText8.setText("0");
    }                                           

    private void ProductTableMouseClicked(java.awt.event.MouseEvent evt) {                                        
        int product = ProductTable.getSelectedRow();
        ProductText1.setText(ProductTable.getModel().getValueAt(product, 0).toString());
        ProductText2.setText(ProductTable.getModel().getValueAt(product, 1).toString());
        ProductText3.setText(ProductTable.getModel().getValueAt(product, 2).toString());
    }                                       

    private void ProductBtn1ActionPerformed(java.awt.event.ActionEvent evt) {                                          
        try{
            String sql = "INSERT INTO Product VALUES (null,'"+ProductText2.getText()+"','"+ProductText3.getText()+"')";
            st = conn.createStatement();
            st.executeUpdate(sql);
          
            ViewProduct();
        }catch (SQLException e){
            System.out.println(e.getMessage());
        }
      
        String a, b, c;
        a = ProductText1.getText();
        b = ProductText2.getText();
        c = ProductText3.getText();
        ProductArea.setText(ProductArea.getText()+"ID Login   : "+a+"\nNAMA_Product   : "+b+"\nHarga    : "+c);
      
        JOptionPane.showMessageDialog(this,"Data Telah Di Save");
    }                                         

    private void ProductBtn2ActionPerformed(java.awt.event.ActionEvent evt) {                                          
        try{
            String sql = "UPDATE Product SET nama_Product = '"+ProductText2.getText()+"', Harga  = '"+ProductText3.getText()+"'";
            st = conn.createStatement();
            st.executeUpdate(sql);
          
            ViewProduct();
        }catch (SQLException e){
            System.out.println(e.getMessage());
        }
        JOptionPane.showMessageDialog(this,"Data Telah Di Edit");
    }                                         

    private void ProductBtn3ActionPerformed(java.awt.event.ActionEvent evt) {                                          
        BersihProduct();
        JOptionPane.showMessageDialog(this,"Text Field Telah Dibersihkan");
    }                                         

    private void ProductBtn4ActionPerformed(java.awt.event.ActionEvent evt) {                                          
        try{
            String sql = "DELETE FROM Product WHERE ID_Product = '"+ProductText1.getText()+"'";
            st = conn.createStatement();
            st.executeUpdate(sql);
          
            ViewProduct();
        }catch (SQLException e){
            System.out.println(e.getMessage());
        }
        JOptionPane.showMessageDialog(this,"Data Telah Di Delete");
    }                                         

    private void TransactionTableMouseClicked(java.awt.event.MouseEvent evt) {                                            
        int transaction = TransactionTable.getSelectedRow();
        TransactionText1.setText(TransactionTable.getModel().getValueAt(transaction, 0).toString());
        TransactionText2.setText(TransactionTable.getModel().getValueAt(transaction, 1).toString());
        TransactionText3.setText(TransactionTable.getModel().getValueAt(transaction, 2).toString());
        TransactionText4.setText(TransactionTable.getModel().getValueAt(transaction, 3).toString());
        TransactionText5.setText(TransactionTable.getModel().getValueAt(transaction, 4).toString());
        TransactionText6.setText(TransactionTable.getModel().getValueAt(transaction, 5).toString());
        TransactionText7.setText(TransactionTable.getModel().getValueAt(transaction, 6).toString());
        TransactionText8.setText(TransactionTable.getModel().getValueAt(transaction, 7).toString());
    }                                           

    private void TransactionBtn1ActionPerformed(java.awt.event.ActionEvent evt) {                                              
        try{
            String sql = "INSERT INTO Transaction VALUES (null,'"+TransactionText2.getText()+"','"+TransactionText3.getText()+"','"+TransactionText4.getText()+"', '"+TransactionText5.getText()+"','"+TransactionText6.getText()+"','"+TransactionText7.getText()+"','"+TransactionText8.getText()+"')";
            st = conn.createStatement();
            st.executeUpdate(sql);
          
            ViewTransaction();
        }catch (SQLException e){
            System.out.println(e.getMessage());
        }
      
        String a, b, c, d, e, f, g, h, i, j, k;
        a = TransactionText1.getText();
        b = TransactionText2.getText();
        c = TransactionText3.getText();
        d = TransactionText4.getText();
        e = TransactionText5.getText();
        f = TransactionText6.getText();
        g = TransactionText7.getText();
        h = TransactionText8.getText();
      
        TransactionArea.setText(TransactionArea.getText()+"ID Transaction   : "+a+"\nPembeli   : "+b+"\nNama Product    : "+c+"\nHarga    : "+d+"\nJumlah Pembelian    : "+e+"\nHasil   : "+f+"\nDiskon     : "+g+"\nTotal    : "+h);
      
        JOptionPane.showMessageDialog(this,"Data Telah Di Save");
    }                                             

    private void TransactionBtn2ActionPerformed(java.awt.event.ActionEvent evt) {                                              
        try{
            String sql = "UPDATE Transaction SET Pembeli = '"+TransactionText2.getText()+"',nama_Product = '"+TransactionText3.getText()+"', Harga  = '"+TransactionText4.getText()+"', Jumlah_Pembelian  = '"+TransactionText5.getText()+"', Hasil  = '"+TransactionText6.getText()+"', Diskon  = '"+TransactionText7.getText()+"', Total  = '"+TransactionText8.getText()+"'";
            st = conn.createStatement();
            st.executeUpdate(sql);
          
            ViewTransaction();
        }catch (SQLException e){
            System.out.println(e.getMessage());
        }
        JOptionPane.showMessageDialog(this,"Data Telah Di Edit");
    }                                             

    private void TransactionBtn3ActionPerformed(java.awt.event.ActionEvent evt) {                                              
        BersihTransaction();
        JOptionPane.showMessageDialog(this,"Text Field Telah Dibersihkan");
    }                                             

    private void TransactionBtn4ActionPerformed(java.awt.event.ActionEvent evt) {                                              
        try{
            String sql = "DELETE FROM Transaction WHERE ID_Transaction = '"+TransactionText1.getText()+"'";
            st = conn.createStatement();
            st.executeUpdate(sql);
          
            ViewTransaction();
        }catch (SQLException e){
            System.out.println(e.getMessage());
        }
        JOptionPane.showMessageDialog(this,"Data Telah Di Delete");
    }                                             

  
    public static void main(String args[]) {
      
        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(Administrator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Administrator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Administrator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Administrator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
      
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Administrator().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify                   
    private javax.swing.JPanel Product;
    private javax.swing.JTextArea ProductArea;
    private javax.swing.JButton ProductBtn1;
    private javax.swing.JButton ProductBtn2;
    private javax.swing.JButton ProductBtn3;
    private javax.swing.JButton ProductBtn4;
    private javax.swing.JLabel ProductLabel;
    private javax.swing.JLabel ProductLabel1;
    private javax.swing.JLabel ProductLabel2;
    private javax.swing.JLabel ProductLabel3;
    private javax.swing.JPanel ProductPanel;
    private javax.swing.JScrollPane ProductSP1;
    private javax.swing.JScrollPane ProductSP2;
    private javax.swing.JScrollPane ProductSP3;
    private javax.swing.JTable ProductTable;
    private javax.swing.JTextField ProductText1;
    private javax.swing.JTextField ProductText2;
    private javax.swing.JTextField ProductText3;
    private javax.swing.JPanel Transaction;
    private javax.swing.JTextArea TransactionArea;
    private javax.swing.JButton TransactionBtn1;
    private javax.swing.JButton TransactionBtn2;
    private javax.swing.JButton TransactionBtn3;
    private javax.swing.JButton TransactionBtn4;
    private javax.swing.JLabel TransactionLabel;
    private javax.swing.JLabel TransactionLabel1;
    private javax.swing.JLabel TransactionLabel2;
    private javax.swing.JLabel TransactionLabel3;
    private javax.swing.JLabel TransactionLabel4;
    private javax.swing.JLabel TransactionLabel5;
    private javax.swing.JLabel TransactionLabel6;
    private javax.swing.JLabel TransactionLabel7;
    private javax.swing.JLabel TransactionLabel8;
    private javax.swing.JPanel TransactionPanel;
    private javax.swing.JScrollPane TransactionSP1;
    private javax.swing.JScrollPane TransactionSP2;
    private javax.swing.JScrollPane TransactionSP3;
    private javax.swing.JTable TransactionTable;
    private javax.swing.JTextField TransactionText1;
    private javax.swing.JTextField TransactionText2;
    private javax.swing.JTextField TransactionText3;
    private javax.swing.JTextField TransactionText4;
    private javax.swing.JTextField TransactionText5;
    private javax.swing.JTextField TransactionText6;
    private javax.swing.JTextField TransactionText7;
    private javax.swing.JTextField TransactionText8;
    private javax.swing.JRadioButton URadioButton1;
    private javax.swing.JRadioButton URadioButton2;
    private javax.swing.JRadioButton URadioButton3;
    private javax.swing.JRadioButton URadioButton4;
    private javax.swing.JPanel User;
    private javax.swing.JTextArea UserArea;
    private javax.swing.JButton UserBtn1;
    private javax.swing.JButton UserBtn2;
    private javax.swing.JButton UserBtn3;
    private javax.swing.JButton UserBtn4;
    private javax.swing.ButtonGroup UserGroup;
    private javax.swing.JLabel UserLabel;
    private javax.swing.JLabel UserLabel1;
    private javax.swing.JLabel UserLabel2;
    private javax.swing.JLabel UserLabel3;
    private javax.swing.JLabel UserLabel4;
    private javax.swing.JLabel UserLabel5;
    private javax.swing.JLabel UserLabel6;
    private javax.swing.JLabel UserLabel7;
    private javax.swing.JLabel UserLabel8;
    private javax.swing.JPanel UserPanel;
    private javax.swing.JScrollPane UserSP1;
    private javax.swing.JScrollPane UserSP2;
    private javax.swing.JScrollPane UserSP3;
    private javax.swing.JTable UserTable;
    private javax.swing.JTextField UserText1;
    private javax.swing.JTextField UserText2;
    private javax.swing.JTextField UserText3;
    private javax.swing.JTextField UserText4;
    private javax.swing.JTextField UserText5;
    private javax.swing.JTextField UserText6;
    private javax.swing.JTextField UserText7;
    private javax.swing.JTextField UserText8;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    // End of variables declaration                 
}

User.java
/*@author Reinaldo*/
package P4_User;

import Koneksi.Koneksi;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;

public class User extends javax.swing.JFrame {

    Connection conn = Koneksi.Conn();
    Statement st;
    ResultSet rs;
  
    private void ViewWishlist(){
        DefaultTableModel model = new DefaultTableModel();
      
        model.addColumn("ID_Wishlist");
        model.addColumn("Nama_Product");
        model.addColumn("Harga");
        model.addColumn("Pembelian");
        model.addColumn("Hasil");
        model.addColumn("Diskon");
        model.addColumn("Total");
      
        try{
            String sql = "SELECT * FROM Wishlist";
            st = conn.createStatement();
            rs = st.executeQuery(sql);
          
          
            while(rs.next()){
              
                model.addRow(new Object []{
                rs.getString("ID_Wishlist"),
                rs.getString("Nama_Product"),
                rs.getString("Harga"),
                rs.getString("Pembelian"),
                rs.getString("Hasil"),
                rs.getString("Diskon"),
                rs.getString("Total")
                });
            }
            WishlistTable.setModel(model);
          
        }catch(SQLException e){
            System.out.println(e.getMessage());
        }
    }
  
    private void ViewTransaction(){
        DefaultTableModel model = new DefaultTableModel();
      
        model.addColumn("ID_Transaction");
        model.addColumn("Pembeli");
        model.addColumn("Nama_Product");
        model.addColumn("Harga");
        model.addColumn("Jumlah_Pembelian");
        model.addColumn("Hasil");
        model.addColumn("Diskon");
        model.addColumn("Total");
      
        try{
            String sql = "SELECT * FROM Transaction";
            st = conn.createStatement();
            rs = st.executeQuery(sql);
          
          
            while(rs.next()){
              
                model.addRow(new Object []{
                rs.getString("ID_Transaction"),
                rs.getString("Pembeli"),
                rs.getString("Nama_Product"),
                rs.getString("Harga"),
                rs.getString("Jumlah_Pembelian"),
                rs.getString("Hasil"),
                rs.getString("Diskon"),
                rs.getString("Total")
                });
            }
            HistoryTable.setModel(model);
          
        }catch(SQLException e){
            System.out.println(e.getMessage());
        }
    }
  
    private void BersihBelanja(){
        BelanjaText1.setText("");
        BelanjaText2.setText("");
        BelanjaText3.setText("");
        BelanjaText4.setText("");
        BelanjaText5.setText("");
        BelanjaText6.setText("");
        BelanjaText7.setText("");
        BelanjaArea.setText("");
    }
  
    private void BersihWishlist(){
        WishlistText1.setText("");
        WishlistText2.setText("");
        WishlistText3.setText("");
        WishlistText4.setText("");
        WishlistText5.setText("");
        WishlistText6.setText("");
        WishlistText7.setText("");
        WishlistArea.setText("");
    }
  
    public User() {
        initComponents();
    }

  
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                        
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        Belanja = new javax.swing.JPanel();
        BelanjaLabel = new javax.swing.JLabel();
        BelanjaSP1 = new javax.swing.JScrollPane();
        BelanjaPanel1 = new javax.swing.JPanel();
        Barang1 = new javax.swing.JButton();
        Barang2 = new javax.swing.JButton();
        Barang3 = new javax.swing.JButton();
        Barang4 = new javax.swing.JButton();
        Barang5 = new javax.swing.JButton();
        Barang6 = new javax.swing.JButton();
        Barang7 = new javax.swing.JButton();
        Barang8 = new javax.swing.JButton();
        Barang9 = new javax.swing.JButton();
        Barang10 = new javax.swing.JButton();
        Barang11 = new javax.swing.JButton();
        Barang12 = new javax.swing.JButton();
        Barang13 = new javax.swing.JButton();
        Barang14 = new javax.swing.JButton();
        Barang15 = new javax.swing.JButton();
        Barang16 = new javax.swing.JButton();
        Barang17 = new javax.swing.JButton();
        Barang18 = new javax.swing.JButton();
        Barang19 = new javax.swing.JButton();
        Barang20 = new javax.swing.JButton();
        Barang21 = new javax.swing.JButton();
        Barang22 = new javax.swing.JButton();
        Barang23 = new javax.swing.JButton();
        Barang24 = new javax.swing.JButton();
        Barang25 = new javax.swing.JButton();
        Barang26 = new javax.swing.JButton();
        Barang27 = new javax.swing.JButton();
        Barang28 = new javax.swing.JButton();
        Barang29 = new javax.swing.JButton();
        Barang30 = new javax.swing.JButton();
        BelanjaSP2 = new javax.swing.JScrollPane();
        BelanjaPanel2 = new javax.swing.JPanel();
        BelanjaLabel1 = new javax.swing.JLabel();
        BelanjaLabel2 = new javax.swing.JLabel();
        BelanjaLabel3 = new javax.swing.JLabel();
        BelanjaLabel4 = new javax.swing.JLabel();
        BelanjaLabel5 = new javax.swing.JLabel();
        BelanjaLabel6 = new javax.swing.JLabel();
        BelanjaLabel7 = new javax.swing.JLabel();
        BelanjaText1 = new javax.swing.JTextField();
        BelanjaText2 = new javax.swing.JTextField();
        BelanjaText3 = new javax.swing.JTextField();
        BelanjaText4 = new javax.swing.JTextField();
        BelanjaText5 = new javax.swing.JTextField();
        BelanjaText6 = new javax.swing.JTextField();
        BelanjaText7 = new javax.swing.JTextField();
        BelanjaSP3 = new javax.swing.JScrollPane();
        BelanjaArea = new javax.swing.JTextArea();
        BelanjaButton1 = new javax.swing.JButton();
        BelanjaButton2 = new javax.swing.JButton();
        BelanjaButton3 = new javax.swing.JButton();
        BelanjaButton4 = new javax.swing.JButton();
        BelanjaLabel8 = new javax.swing.JLabel();
        BelanjaText8 = new javax.swing.JTextField();
        Wishlist = new javax.swing.JPanel();
        WishlistLabel = new javax.swing.JLabel();
        WishlistSP1 = new javax.swing.JScrollPane();
        WishlistTable = new javax.swing.JTable();
        WishlistSP2 = new javax.swing.JScrollPane();
        WishlistPanel1 = new javax.swing.JPanel();
        WishlistLabel1 = new javax.swing.JLabel();
        WishlistLabel2 = new javax.swing.JLabel();
        WishlistLabel3 = new javax.swing.JLabel();
        WishlistLabel4 = new javax.swing.JLabel();
        WishlistLabel5 = new javax.swing.JLabel();
        WishlistLabel6 = new javax.swing.JLabel();
        WishlistLabel7 = new javax.swing.JLabel();
        WishlistText1 = new javax.swing.JTextField();
        WishlistText2 = new javax.swing.JTextField();
        WishlistText3 = new javax.swing.JTextField();
        WishlistText4 = new javax.swing.JTextField();
        WishlistText5 = new javax.swing.JTextField();
        WishlistText6 = new javax.swing.JTextField();
        WishlistText7 = new javax.swing.JTextField();
        WishlistSP3 = new javax.swing.JScrollPane();
        WishlistArea = new javax.swing.JTextArea();
        WishlistBtn1 = new javax.swing.JButton();
        WishlistBtn2 = new javax.swing.JButton();
        History = new javax.swing.JPanel();
        HistoryLabel = new javax.swing.JLabel();
        HistorySP1 = new javax.swing.JScrollPane();
        HistoryTable = new javax.swing.JTable();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });

        jPanel1.setBackground(new java.awt.Color(0, 0, 102));
        jPanel1.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(102, 102, 255)));

        jPanel2.setBackground(new java.awt.Color(0, 51, 51));
        jPanel2.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(153, 255, 153)));

        jLabel1.setForeground(new java.awt.Color(240, 240, 240));
        jLabel1.setText("Menu User");

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

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

        jButton3.setText("History");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jButton4.setText("Exit");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 114, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(70, 70, 70)
                .addComponent(jButton1)
                .addGap(33, 33, 33)
                .addComponent(jButton2)
                .addGap(37, 37, 37)
                .addComponent(jButton3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jButton4)
                .addContainerGap())
        );

        jPanel3.setBackground(new java.awt.Color(102, 0, 0));
        jPanel3.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(255, 153, 153)));
        jPanel3.setLayout(new java.awt.CardLayout());

        Belanja.setBackground(new java.awt.Color(102, 0, 102));

        BelanjaLabel.setForeground(new java.awt.Color(240, 240, 240));
        BelanjaLabel.setText("Belanja Panel");
        BelanjaLabel.setToolTipText("");

        BelanjaPanel1.setBackground(new java.awt.Color(0, 0, 102));
        BelanjaPanel1.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(153, 153, 255)));

        Barang1.setText("Barang");
        Barang1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Barang1ActionPerformed(evt);
            }
        });

        Barang2.setText("Barang");

        Barang3.setText("Barang");

        Barang4.setText("Barang");

        Barang5.setText("Barang");

        Barang6.setText("Barang");

        Barang7.setText("Barang");

        Barang8.setText("Barang");

        Barang9.setText("Barang");

        Barang10.setText("Barang");

        Barang11.setText("Barang");

        Barang12.setText("Barang");

        Barang13.setText("Barang");

        Barang14.setText("Barang");

        Barang15.setText("Barang");

        Barang16.setText("Barang");

        Barang17.setText("Barang");

        Barang18.setText("Barang");

        Barang19.setText("Barang");

        Barang20.setText("Barang");

        Barang21.setText("Barang");

        Barang22.setText("Barang");

        Barang23.setText("Barang");

        Barang24.setText("Barang");

        Barang25.setText("Barang");

        Barang26.setText("Barang");

        Barang27.setText("Barang");

        Barang28.setText("Barang");

        Barang29.setText("Barang");

        Barang30.setText("Barang");

        javax.swing.GroupLayout BelanjaPanel1Layout = new javax.swing.GroupLayout(BelanjaPanel1);
        BelanjaPanel1.setLayout(BelanjaPanel1Layout);
        BelanjaPanel1Layout.setHorizontalGroup(
            BelanjaPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(BelanjaPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(BelanjaPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, BelanjaPanel1Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(Barang13)
                        .addGap(18, 18, 18)
                        .addComponent(Barang14)
                        .addGap(18, 18, 18)
                        .addComponent(Barang15)
                        .addGap(18, 18, 18)
                        .addComponent(Barang16)
                        .addGap(18, 18, 18)
                        .addComponent(Barang17)
                        .addGap(18, 18, 18)
                        .addComponent(Barang18))
                    .addGroup(BelanjaPanel1Layout.createSequentialGroup()
                        .addGroup(BelanjaPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(BelanjaPanel1Layout.createSequentialGroup()
                                .addComponent(Barang1)
                                .addGap(18, 18, 18)
                                .addComponent(Barang2)
                                .addGap(18, 18, 18)
                                .addComponent(Barang3)
                                .addGap(18, 18, 18)
                                .addComponent(Barang4)
                                .addGap(18, 18, 18)
                                .addComponent(Barang5)
                                .addGap(18, 18, 18)
                                .addComponent(Barang6))
                            .addGroup(BelanjaPanel1Layout.createSequentialGroup()
                                .addComponent(Barang7)
                                .addGap(18, 18, 18)
                                .addComponent(Barang8)
                                .addGap(18, 18, 18)
                                .addComponent(Barang9)
                                .addGap(18, 18, 18)
                                .addComponent(Barang10)
                                .addGap(18, 18, 18)
                                .addComponent(Barang11)
                                .addGap(18, 18, 18)
                                .addComponent(Barang12))
                            .addGroup(BelanjaPanel1Layout.createSequentialGroup()
                                .addComponent(Barang19)
                                .addGap(18, 18, 18)
                                .addComponent(Barang20)
                                .addGap(18, 18, 18)
                                .addComponent(Barang21)
                                .addGap(18, 18, 18)
                                .addComponent(Barang22)
                                .addGap(18, 18, 18)
                                .addComponent(Barang23)
                                .addGap(18, 18, 18)
                                .addComponent(Barang24))
                            .addGroup(BelanjaPanel1Layout.createSequentialGroup()
                                .addComponent(Barang25)
                                .addGap(18, 18, 18)
                                .addComponent(Barang26)
                                .addGap(18, 18, 18)
                                .addComponent(Barang27)
                                .addGap(18, 18, 18)
                                .addComponent(Barang28)
                                .addGap(18, 18, 18)
                                .addComponent(Barang29)
                                .addGap(18, 18, 18)
                                .addComponent(Barang30)))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        BelanjaPanel1Layout.setVerticalGroup(
            BelanjaPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(BelanjaPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(BelanjaPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Barang1)
                    .addComponent(Barang2)
                    .addComponent(Barang3)
                    .addComponent(Barang4)
                    .addComponent(Barang5)
                    .addComponent(Barang6))
                .addGap(18, 18, 18)
                .addGroup(BelanjaPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Barang7)
                    .addComponent(Barang8)
                    .addComponent(Barang9)
                    .addComponent(Barang10)
                    .addComponent(Barang11)
                    .addComponent(Barang12))
                .addGap(18, 18, 18)
                .addGroup(BelanjaPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Barang13)
                    .addComponent(Barang14)
                    .addComponent(Barang15)
                    .addComponent(Barang16)
                    .addComponent(Barang17)
                    .addComponent(Barang18))
                .addGap(18, 18, 18)
                .addGroup(BelanjaPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Barang19)
                    .addComponent(Barang20)
                    .addComponent(Barang21)
                    .addComponent(Barang22)
                    .addComponent(Barang23)
                    .addComponent(Barang24))
                .addGap(18, 18, 18)
                .addGroup(BelanjaPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Barang25)
                    .addComponent(Barang26)
                    .addComponent(Barang27)
                    .addComponent(Barang28)
                    .addComponent(Barang29)
                    .addComponent(Barang30))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        BelanjaSP1.setViewportView(BelanjaPanel1);

        BelanjaPanel2.setBackground(new java.awt.Color(153, 153, 0));
        BelanjaPanel2.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(255, 255, 153)));

        BelanjaLabel1.setForeground(new java.awt.Color(240, 240, 240));
        BelanjaLabel1.setText("ID Product");
        BelanjaLabel1.setToolTipText("");

        BelanjaLabel2.setForeground(new java.awt.Color(240, 240, 240));
        BelanjaLabel2.setText("Nama Product");
        BelanjaLabel2.setToolTipText("");

        BelanjaLabel3.setForeground(new java.awt.Color(240, 240, 240));
        BelanjaLabel3.setText("Harga");
        BelanjaLabel3.setToolTipText("");

        BelanjaLabel4.setForeground(new java.awt.Color(240, 240, 240));
        BelanjaLabel4.setText("Pembelian");
        BelanjaLabel4.setToolTipText("");

        BelanjaLabel5.setForeground(new java.awt.Color(240, 240, 240));
        BelanjaLabel5.setText("Hasil");
        BelanjaLabel5.setToolTipText("");

        BelanjaLabel6.setForeground(new java.awt.Color(240, 240, 240));
        BelanjaLabel6.setText("Diskon");
        BelanjaLabel6.setToolTipText("");

        BelanjaLabel7.setForeground(new java.awt.Color(240, 240, 240));
        BelanjaLabel7.setText("Total");
        BelanjaLabel7.setToolTipText("");

        BelanjaText1.setEditable(false);

        BelanjaText2.setEditable(false);

        BelanjaText3.setEditable(false);

        BelanjaText5.setEditable(false);

        BelanjaText6.setEditable(false);

        BelanjaText7.setEditable(false);

        BelanjaArea.setColumns(20);
        BelanjaArea.setRows(5);
        BelanjaSP3.setViewportView(BelanjaArea);

        BelanjaButton1.setText("Hitung");
        BelanjaButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BelanjaButton1ActionPerformed(evt);
            }
        });

        BelanjaButton2.setText("Beli");
        BelanjaButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BelanjaButton2ActionPerformed(evt);
            }
        });

        BelanjaButton3.setText("Batal");
        BelanjaButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BelanjaButton3ActionPerformed(evt);
            }
        });

        BelanjaButton4.setText("Masukkan Kedalam Wishlist");
        BelanjaButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BelanjaButton4ActionPerformed(evt);
            }
        });

        BelanjaLabel8.setForeground(new java.awt.Color(240, 240, 240));
        BelanjaLabel8.setText("Pembeli");
        BelanjaLabel8.setToolTipText("");

        BelanjaText8.setEditable(false);

        javax.swing.GroupLayout BelanjaPanel2Layout = new javax.swing.GroupLayout(BelanjaPanel2);
        BelanjaPanel2.setLayout(BelanjaPanel2Layout);
        BelanjaPanel2Layout.setHorizontalGroup(
            BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(BelanjaPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(BelanjaLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(BelanjaLabel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(BelanjaLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(BelanjaLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(BelanjaLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(BelanjaLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(BelanjaLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(BelanjaLabel8))
                .addGap(18, 18, 18)
                .addGroup(BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(BelanjaPanel2Layout.createSequentialGroup()
                        .addGroup(BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(BelanjaText1, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(BelanjaText2, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(BelanjaText3, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(BelanjaText4, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(BelanjaText5, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(BelanjaButton1, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(BelanjaText8, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(BelanjaSP3))
                    .addGroup(BelanjaPanel2Layout.createSequentialGroup()
                        .addComponent(BelanjaText7, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(BelanjaButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(BelanjaPanel2Layout.createSequentialGroup()
                        .addComponent(BelanjaText6, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(BelanjaButton2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(BelanjaButton3)))
                .addContainerGap())
        );
        BelanjaPanel2Layout.setVerticalGroup(
            BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(BelanjaPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(BelanjaPanel2Layout.createSequentialGroup()
                        .addGroup(BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(BelanjaLabel1)
                            .addComponent(BelanjaText1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(BelanjaLabel2)
                            .addComponent(BelanjaText2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(BelanjaLabel3)
                            .addComponent(BelanjaText3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(BelanjaLabel4)
                            .addComponent(BelanjaText4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(BelanjaLabel8)
                            .addComponent(BelanjaText8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(BelanjaButton1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(BelanjaLabel5)
                            .addComponent(BelanjaText5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(BelanjaSP3))
                .addGap(18, 18, 18)
                .addGroup(BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(BelanjaLabel6)
                    .addComponent(BelanjaText6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(BelanjaButton2)
                    .addComponent(BelanjaButton3))
                .addGap(18, 18, 18)
                .addGroup(BelanjaPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(BelanjaLabel7)
                    .addComponent(BelanjaText7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(BelanjaButton4))
                .addContainerGap(23, Short.MAX_VALUE))
        );

        BelanjaSP2.setViewportView(BelanjaPanel2);

        javax.swing.GroupLayout BelanjaLayout = new javax.swing.GroupLayout(Belanja);
        Belanja.setLayout(BelanjaLayout);
        BelanjaLayout.setHorizontalGroup(
            BelanjaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, BelanjaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(BelanjaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(BelanjaSP2)
                    .addComponent(BelanjaSP1, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, BelanjaLayout.createSequentialGroup()
                        .addComponent(BelanjaLabel)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        BelanjaLayout.setVerticalGroup(
            BelanjaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(BelanjaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(BelanjaLabel)
                .addGap(18, 18, 18)
                .addComponent(BelanjaSP1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(BelanjaSP2, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel3.add(Belanja, "card2");

        Wishlist.setBackground(new java.awt.Color(102, 0, 0));

        WishlistLabel.setForeground(new java.awt.Color(240, 240, 240));
        WishlistLabel.setText("Wishlist Panel");
        WishlistLabel.setToolTipText("");

        WishlistTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "ID_Wishlist", "Nama_Product", "Harga", "Pembelian", "Hasil", "Diskon", "Total"
            }
        ));
        WishlistTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                WishlistTableMouseClicked(evt);
            }
        });
        WishlistSP1.setViewportView(WishlistTable);

        WishlistPanel1.setBackground(new java.awt.Color(51, 102, 0));
        WishlistPanel1.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(153, 255, 153)));

        WishlistLabel1.setForeground(new java.awt.Color(240, 240, 240));
        WishlistLabel1.setText("ID_Wishlist");
        WishlistLabel1.setToolTipText("");

        WishlistLabel2.setForeground(new java.awt.Color(240, 240, 240));
        WishlistLabel2.setText("Nama_Product");
        WishlistLabel2.setToolTipText("");

        WishlistLabel3.setForeground(new java.awt.Color(240, 240, 240));
        WishlistLabel3.setText("Harga");
        WishlistLabel3.setToolTipText("");

        WishlistLabel4.setForeground(new java.awt.Color(240, 240, 240));
        WishlistLabel4.setText("Pembelian");
        WishlistLabel4.setToolTipText("");

        WishlistLabel5.setForeground(new java.awt.Color(240, 240, 240));
        WishlistLabel5.setText("Hasil");
        WishlistLabel5.setToolTipText("");

        WishlistLabel6.setForeground(new java.awt.Color(240, 240, 240));
        WishlistLabel6.setText("Diskon");
        WishlistLabel6.setToolTipText("");

        WishlistLabel7.setForeground(new java.awt.Color(240, 240, 240));
        WishlistLabel7.setText("Total");
        WishlistLabel7.setToolTipText("");

        WishlistText1.setEditable(false);

        WishlistText2.setEditable(false);

        WishlistText3.setEditable(false);

        WishlistText4.setEditable(false);

        WishlistText5.setEditable(false);

        WishlistText6.setEditable(false);

        WishlistText7.setEditable(false);

        WishlistArea.setColumns(20);
        WishlistArea.setRows(5);
        WishlistSP3.setViewportView(WishlistArea);

        WishlistBtn1.setText("Beli");
        WishlistBtn1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                WishlistBtn1ActionPerformed(evt);
            }
        });

        WishlistBtn2.setText("Batal");
        WishlistBtn2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                WishlistBtn2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout WishlistPanel1Layout = new javax.swing.GroupLayout(WishlistPanel1);
        WishlistPanel1.setLayout(WishlistPanel1Layout);
        WishlistPanel1Layout.setHorizontalGroup(
            WishlistPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(WishlistPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(WishlistPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(WishlistPanel1Layout.createSequentialGroup()
                        .addComponent(WishlistLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(WishlistText4, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(WishlistPanel1Layout.createSequentialGroup()
                        .addComponent(WishlistLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(WishlistText5, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(WishlistPanel1Layout.createSequentialGroup()
                        .addComponent(WishlistLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(WishlistText6, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(WishlistPanel1Layout.createSequentialGroup()
                        .addComponent(WishlistLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(WishlistText7, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(WishlistPanel1Layout.createSequentialGroup()
                        .addComponent(WishlistLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(WishlistText1, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(WishlistPanel1Layout.createSequentialGroup()
                        .addComponent(WishlistLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(WishlistText2, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(WishlistPanel1Layout.createSequentialGroup()
                        .addComponent(WishlistLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(WishlistText3, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(WishlistPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(WishlistPanel1Layout.createSequentialGroup()
                        .addComponent(WishlistBtn1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(WishlistBtn2))
                    .addComponent(WishlistSP3, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE))
                .addContainerGap())
        );
        WishlistPanel1Layout.setVerticalGroup(
            WishlistPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(WishlistPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(WishlistPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(WishlistSP3, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, WishlistPanel1Layout.createSequentialGroup()
                        .addGroup(WishlistPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(WishlistLabel1)
                            .addComponent(WishlistText1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(WishlistPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(WishlistLabel2)
                            .addComponent(WishlistText2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(WishlistPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(WishlistLabel3)
                            .addComponent(WishlistText3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(WishlistPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(WishlistLabel4)
                            .addComponent(WishlistText4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(WishlistPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(WishlistLabel5)
                            .addComponent(WishlistText5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(WishlistPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(WishlistLabel6)
                            .addComponent(WishlistText6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(WishlistPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(WishlistLabel7)
                            .addComponent(WishlistText7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(18, 18, 18)
                .addGroup(WishlistPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(WishlistBtn1)
                    .addComponent(WishlistBtn2))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        WishlistSP2.setViewportView(WishlistPanel1);

        javax.swing.GroupLayout WishlistLayout = new javax.swing.GroupLayout(Wishlist);
        Wishlist.setLayout(WishlistLayout);
        WishlistLayout.setHorizontalGroup(
            WishlistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, WishlistLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(WishlistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(WishlistSP2, javax.swing.GroupLayout.DEFAULT_SIZE, 582, Short.MAX_VALUE)
                    .addComponent(WishlistSP1, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, WishlistLayout.createSequentialGroup()
                        .addComponent(WishlistLabel)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        WishlistLayout.setVerticalGroup(
            WishlistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(WishlistLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(WishlistLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(WishlistSP1, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(WishlistSP2, javax.swing.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel3.add(Wishlist, "card3");

        History.setBackground(new java.awt.Color(102, 0, 102));

        HistoryLabel.setForeground(new java.awt.Color(240, 240, 240));
        HistoryLabel.setText("History Panel");
        HistoryLabel.setToolTipText("");

        HistoryTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "ID_Transaction", "Pembeli", "Nama_Product", "Harga", "Jumlah_Pembelian", "Hasil", "Diskon", "Total"
            }
        ));
        HistorySP1.setViewportView(HistoryTable);

        javax.swing.GroupLayout HistoryLayout = new javax.swing.GroupLayout(History);
        History.setLayout(HistoryLayout);
        HistoryLayout.setHorizontalGroup(
            HistoryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(HistoryLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(HistoryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(HistoryLayout.createSequentialGroup()
                        .addComponent(HistoryLabel)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(HistorySP1, javax.swing.GroupLayout.DEFAULT_SIZE, 582, Short.MAX_VALUE))
                .addContainerGap())
        );
        HistoryLayout.setVerticalGroup(
            HistoryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(HistoryLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(HistoryLabel)
                .addGap(18, 18, 18)
                .addComponent(HistorySP1, javax.swing.GroupLayout.DEFAULT_SIZE, 397, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel3.add(History, "card4");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

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

    private void formWindowOpened(java.awt.event.WindowEvent evt) {                                
        ViewWishlist();
        ViewTransaction();
    }                               

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                       
        jPanel3.removeAll();
        jPanel3.repaint();
        jPanel3.revalidate();      
        jPanel3.add(Belanja);
        jPanel3.repaint();
        jPanel3.revalidate();
    }                                      

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                       
        jPanel3.removeAll();
        jPanel3.repaint();
        jPanel3.revalidate();      
        jPanel3.add(Wishlist);
        jPanel3.repaint();
        jPanel3.revalidate();
    }                                      

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                       
        jPanel3.removeAll();
        jPanel3.repaint();
        jPanel3.revalidate();      
        jPanel3.add(History);
        jPanel3.repaint();
        jPanel3.revalidate();
    }                                      

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                       
        System.exit(0);
    }                                      

    private void Barang1ActionPerformed(java.awt.event.ActionEvent evt) {                                      
        BelanjaText1.setText("");
        BelanjaText2.setText("Micin");
        BelanjaText3.setText("3000");
    }                                     

    private void BelanjaButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                             
        int hs1 = Integer.parseInt(BelanjaText3.getText());
        int hs2 = Integer.parseInt(BelanjaText4.getText());
      
        int hasil = hs1*hs2;
        int Diskon;
        if (hasil >= 100000)
            Diskon = (int) (hasil*0.02);
        else
            Diskon = 0;
      
        int total = hasil-Diskon;
      
        BelanjaText5.setText(""+hasil);
        BelanjaText6.setText(""+Diskon);
        BelanjaText7.setText(""+total);
    }                                            

    private void BelanjaButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                             
        try{
            String sql = "INSERT INTO Transaction VALUES (null, '"+BelanjaText8.getText()+"', '"+BelanjaText2.getText()+"','"+BelanjaText3.getText()+"', '"+BelanjaText4.getText()+"','"+BelanjaText5.getText()+"','"+BelanjaText6.getText()+"','"+BelanjaText7.getText()+"')";
            st = conn.createStatement();
            st.executeUpdate(sql);
          
            ViewTransaction();
        }catch (SQLException e){
            System.out.println(e.getMessage());
        }
      
        String a, b, c, d, e, f, g;
        a = BelanjaText2.getText();
        b = BelanjaText2.getText();
        c = BelanjaText2.getText();
        d = BelanjaText2.getText();
        e = BelanjaText2.getText();
        f = BelanjaText2.getText();
        g = BelanjaText2.getText();
      
        BelanjaArea.setText(BelanjaArea.getText()+"ID Product   : "+a+"\nNama Product   : "+b+"\nHarga    : "+c+"\nPembelian    : "+d+"\nHasil    : "+e+"\nDiskon   : "+f+"\nTotal     : "+g);
      
        JOptionPane.showMessageDialog(this,"Data Telah Di Beli");
    }                                            

    private void BelanjaButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                             
        BersihBelanja();
    }                                            

    private void BelanjaButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                             
        try{
            String sql = "INSERT INTO Wishlist VALUES (null, '"+BelanjaText2.getText()+"', '"+BelanjaText3.getText()+"', '"+BelanjaText4.getText()+"', '"+BelanjaText5.getText()+"','"+BelanjaText6.getText()+"','"+BelanjaText7.getText()+"')";
            st = conn.createStatement();
            st.executeUpdate(sql);
          
            ViewWishlist();
        }catch (SQLException e){
            System.out.println(e.getMessage());
        }
    }                                            

    private void WishlistTableMouseClicked(java.awt.event.MouseEvent evt) {                                         
        int wishlist = WishlistTable.getSelectedRow();
        WishlistText1.setText(WishlistTable.getModel().getValueAt(wishlist, 0).toString());
        WishlistText2.setText(WishlistTable.getModel().getValueAt(wishlist, 1).toString());
        WishlistText3.setText(WishlistTable.getModel().getValueAt(wishlist, 2).toString());
        WishlistText4.setText(WishlistTable.getModel().getValueAt(wishlist, 3).toString());
        WishlistText5.setText(WishlistTable.getModel().getValueAt(wishlist, 4).toString());
        WishlistText6.setText(WishlistTable.getModel().getValueAt(wishlist, 5).toString());
        WishlistText7.setText(WishlistTable.getModel().getValueAt(wishlist, 6).toString());
    }                                        

    private void WishlistBtn1ActionPerformed(java.awt.event.ActionEvent evt) {                                           
        try{
            String sql = "INSERT INTO Transaction VALUES (null, null, '"+WishlistText2.getText()+"','"+WishlistText3.getText()+"', '"+WishlistText4.getText()+"','"+WishlistText5.getText()+"','"+WishlistText6.getText()+"','"+WishlistText7.getText()+"')";
            st = conn.createStatement();
            st.executeUpdate(sql);
          
            ViewTransaction();
        }catch (SQLException e){
            System.out.println(e.getMessage());
        }
      
        String a, b, c, d, e, f, g;
        a = WishlistText1.getText();
        b = WishlistText2.getText();
        c = WishlistText3.getText();
        d = WishlistText4.getText();
        e = WishlistText5.getText();
        f = WishlistText6.getText();
        g = WishlistText7.getText();
      
        BelanjaArea.setText(BelanjaArea.getText()+"ID Product   : "+a+"\nNama Product   : "+b+"\nHarga    : "+c+"\nPembelian    : "+d+"\nHasil    : "+e+"\nDiskon   : "+f+"\nTotal     : "+g);
      
        JOptionPane.showMessageDialog(this,"Data Telah Di Beli");
    }                                          

    private void WishlistBtn2ActionPerformed(java.awt.event.ActionEvent evt) {                                           
        BersihWishlist();
    }                                          

  
    public static void main(String args[]) {
      
        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(User.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(User.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(User.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(User.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
      
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new User().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify                   
    private javax.swing.JButton Barang1;
    private javax.swing.JButton Barang10;
    private javax.swing.JButton Barang11;
    private javax.swing.JButton Barang12;
    private javax.swing.JButton Barang13;
    private javax.swing.JButton Barang14;
    private javax.swing.JButton Barang15;
    private javax.swing.JButton Barang16;
    private javax.swing.JButton Barang17;
    private javax.swing.JButton Barang18;
    private javax.swing.JButton Barang19;
    private javax.swing.JButton Barang2;
    private javax.swing.JButton Barang20;
    private javax.swing.JButton Barang21;
    private javax.swing.JButton Barang22;
    private javax.swing.JButton Barang23;
    private javax.swing.JButton Barang24;
    private javax.swing.JButton Barang25;
    private javax.swing.JButton Barang26;
    private javax.swing.JButton Barang27;
    private javax.swing.JButton Barang28;
    private javax.swing.JButton Barang29;
    private javax.swing.JButton Barang3;
    private javax.swing.JButton Barang30;
    private javax.swing.JButton Barang4;
    private javax.swing.JButton Barang5;
    private javax.swing.JButton Barang6;
    private javax.swing.JButton Barang7;
    private javax.swing.JButton Barang8;
    private javax.swing.JButton Barang9;
    private javax.swing.JPanel Belanja;
    private javax.swing.JTextArea BelanjaArea;
    private javax.swing.JButton BelanjaButton1;
    private javax.swing.JButton BelanjaButton2;
    private javax.swing.JButton BelanjaButton3;
    private javax.swing.JButton BelanjaButton4;
    private javax.swing.JLabel BelanjaLabel;
    private javax.swing.JLabel BelanjaLabel1;
    private javax.swing.JLabel BelanjaLabel2;
    private javax.swing.JLabel BelanjaLabel3;
    private javax.swing.JLabel BelanjaLabel4;
    private javax.swing.JLabel BelanjaLabel5;
    private javax.swing.JLabel BelanjaLabel6;
    private javax.swing.JLabel BelanjaLabel7;
    private javax.swing.JLabel BelanjaLabel8;
    private javax.swing.JPanel BelanjaPanel1;
    private javax.swing.JPanel BelanjaPanel2;
    private javax.swing.JScrollPane BelanjaSP1;
    private javax.swing.JScrollPane BelanjaSP2;
    private javax.swing.JScrollPane BelanjaSP3;
    private javax.swing.JTextField BelanjaText1;
    private javax.swing.JTextField BelanjaText2;
    private javax.swing.JTextField BelanjaText3;
    private javax.swing.JTextField BelanjaText4;
    private javax.swing.JTextField BelanjaText5;
    private javax.swing.JTextField BelanjaText6;
    private javax.swing.JTextField BelanjaText7;
    private javax.swing.JTextField BelanjaText8;
    private javax.swing.JPanel History;
    private javax.swing.JLabel HistoryLabel;
    private javax.swing.JScrollPane HistorySP1;
    private javax.swing.JTable HistoryTable;
    private javax.swing.JPanel Wishlist;
    private javax.swing.JTextArea WishlistArea;
    private javax.swing.JButton WishlistBtn1;
    private javax.swing.JButton WishlistBtn2;
    private javax.swing.JLabel WishlistLabel;
    private javax.swing.JLabel WishlistLabel1;
    private javax.swing.JLabel WishlistLabel2;
    private javax.swing.JLabel WishlistLabel3;
    private javax.swing.JLabel WishlistLabel4;
    private javax.swing.JLabel WishlistLabel5;
    private javax.swing.JLabel WishlistLabel6;
    private javax.swing.JLabel WishlistLabel7;
    private javax.swing.JPanel WishlistPanel1;
    private javax.swing.JScrollPane WishlistSP1;
    private javax.swing.JScrollPane WishlistSP2;
    private javax.swing.JScrollPane WishlistSP3;
    private javax.swing.JTable WishlistTable;
    private javax.swing.JTextField WishlistText1;
    private javax.swing.JTextField WishlistText2;
    private javax.swing.JTextField WishlistText3;
    private javax.swing.JTextField WishlistText4;
    private javax.swing.JTextField WishlistText5;
    private javax.swing.JTextField WishlistText6;
    private javax.swing.JTextField WishlistText7;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    // End of variables declaration                 
}

sekian dari saya, kurang lebihnya mohon dimaafkan jika tejadi salah kata yang disengaja maupun tidak. saaya harap program ini dapat mengisi nilai UAS dengan sebaik-baiknya.

UAS Pemrograman II (java)

- Copyright © 2013 ^_^ Selamat Datang ^_^ - Powered by Blogger - Distributed By Blogger Themes - Designed by Johanes Djogan