package rnb.cell;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
/**
*
* @author azhar
*/
public class Admin_form extends javax.swing.JFrame {
/**
* Creates new form Admin_form
*/
String tanggal;
DefaultTableModel model,model1,model2,model3,model4;
public Admin_form() {
initComponents();
loadall();
}
int cekpildate(){
int n=1;
if (pildate.getDate()==null){
n=0;
JOptionPane.showMessageDialog(null, "Pilih dulu tanggalnya","Error",0);
}
return n;
}
public final void loadproduk (){
try {
model.getDataVector().removeAllElements();
model.fireTableDataChanged();
Connection c = koneksi.getkoneksi();
String sql = "SELECT * FROM produk order by id_produk asc";
Statement s = c.createStatement();
try (ResultSet r = s.executeQuery(sql)) {
Kodepro.removeAllItems();
Kodepro.addItem("Pilih kode produk");
while (r.next()){
Object [] o = new Object [2];
o[0]=r.getString(1);
o[1]=r.getString(2);
Kodepro.addItem(r.getObject(1));
model.addRow(o);
}
}}catch(SQLException e){System.out.println("Terjadi error");}
}
public final void voucher(){
try {
model3.getDataVector().removeAllElements();
model3.fireTableDataChanged();
Connection c = koneksi.getkoneksi();
String sql = "SELECT kd_brg,nm_produk,nominal.id_nominal,stock FROM kode,produk,nominal where kode.id_produk=produk.Id_produk and kode.id_nominal=nominal.id_nominal order by nm_produk asc";
Statement s = c.createStatement();
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
Object [] o = new Object [3];
o[0]=r.getString(1);
o[1]=r.getString(2)+" "+r.getString(3);
o[2]=r.getInt(4);
model3.addRow(o);
}
}}catch(SQLException e){System.out.println("Terjadi error");}}
public final void loadall(){
model = new DefaultTableModel ();
model1 = new DefaultTableModel ();
model2 = new DefaultTableModel ();
model3 = new DefaultTableModel ();
model4 = new DefaultTableModel ();
List_nominal.setModel(model1);
List_produk.setModel(model);
Stock.setModel(model3);
tb_harga.setModel(model2);
tbpenjualan.setModel(model4);
model.addColumn("Kode Produk");
model.addColumn("Nama Produk");
model1.addColumn("Kode Nominal");
model1.addColumn("Nominal");
model2.addColumn("Kode barang");
model2.addColumn("kode produk");
model2.addColumn("kode nominal");
model2.addColumn("harga beli");
model2.addColumn("harga jual");
model3.addColumn("Kode Barang");
model3.addColumn("Nama Produk");
model3.addColumn("Stok");
model4.addColumn("Tanggal");
model4.addColumn("Nama Produk");
model4.addColumn("Total");
voucher();
loadproduk();
loadnominal();
loadharga();
penjualan();
}
public void penjualan(String tgl){
try { int totbel=0,totjual=0;
model4.getDataVector().removeAllElements();
model4.fireTableDataChanged();
Connection c = koneksi.getkoneksi();
String sql = "SELECT date,nama_voucher,harga_jual*quantity as tot,"
+ " harga_beli*quantity as totbel FROM transaksi,kode where transaksi.kd_brg=kode.kd_brg and "
+ "status='d'and date like '"+tgl+"'"
+"order by date desc";
Statement s = c.createStatement();
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
Object [] o = new Object [3];
o[0]=r.getString(1);
o[1]=r.getString(2);
o[2]=r.getString(3);
totbel=totbel+r.getInt(4);
totjual=totjual+r.getInt(3);
model4.addRow(o);
}
}
totpend.setValue(totjual);
laba.setValue(totjual-totbel);
jmltrx.setText(String.valueOf(model4.getRowCount()));
}catch(SQLException e){System.out.println("Terjadi error");}
}
public final void penjualan(){
try { int totbel=0,totjual=0;
model4.getDataVector().removeAllElements();
model4.fireTableDataChanged();
Connection c = koneksi.getkoneksi();
String sql = "SELECT date,nama_voucher,harga_jual*quantity as tot,"
+ " harga_beli*quantity as totbel FROM transaksi,kode where transaksi.kd_brg=kode.kd_brg and status='d'"
+"order by date desc";
SimpleDateFormat a = new SimpleDateFormat("yyyy-MM-dd");
Statement s = c.createStatement();
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
Object [] o = new Object [3];
o[0]=r.getString(1);
o[1]=r.getString(2);
o[2]=r.getString(3);
totbel=totbel+r.getInt(4);
totjual=totjual+r.getInt(3);
model4.addRow(o);
}
try {
pildate.setMinSelectableDate(a.parse("2012-01-01"));
} catch (ParseException ex) {
Logger.getLogger(Admin_form.class.getName()).log(Level.SEVERE, null, ex);
}
}
totpend.setValue(totjual);
laba.setValue(totjual-totbel);
jmltrx.setText(String.valueOf(model4.getRowCount()));
}catch(SQLException e){System.out.println("Terjadi error");}
}
public final void loadharga(){
try {
model2.getDataVector().removeAllElements();
model2.fireTableDataChanged();
Connection c = koneksi.getkoneksi();
String sql = "SELECT kd_brg,id_produk,id_nominal,harga_beli,harga_jual FROM kode order by id_produk asc";
Statement s = c.createStatement();
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
Object [] o = new Object [5];
o[0]=r.getString(1);
o[1]=r.getString(2);
o[2]=r.getString(3);
o[3]=r.getInt(4);
o[4]=r.getInt(5);
model2.addRow(o);
}
}}catch(SQLException e){System.out.println("Terjadi error");}
}
public final void tambahproduk(String kode,String produk){
try{Connection c = koneksi.getkoneksi();
String sql = "Insert into produk values(?,?) ";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, kode);
p.setString(2, produk);
p.executeUpdate();
}
}catch(SQLException e){System.out.println("Terjadi error");}
}
public void updateproduk(String kode,String produk,String kondisi){
try {Connection c = koneksi.getkoneksi();
String sql = "UPDATE produk SET id_produk = ?,nm_produk=? WHERE id_produk=?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, kode);
p.setString(2, produk);
p.setString(3, kondisi);
p.executeUpdate();
}}catch(SQLException e){}}
public void tambahnominal(String kode,String nominal){
try{Connection c = koneksi.getkoneksi();
String sql = "Insert into nominal values(?,?) ";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, kode);
p.setString(2, nominal);
p.executeUpdate();
}
}catch(SQLException e){System.out.println("Terjadi error");}}
public void updatenominal(String kode,String nominal,String kondisi){
try {Connection c = koneksi.getkoneksi();
String sql = "UPDATE nominal SET id_nominal = ?,nominal=? WHERE id_nominal=?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, kode);
p.setString(2, nominal);
p.setString(3, kondisi);
p.executeUpdate();
}}catch(SQLException e){}
}
public void updatestok(int stok,String kondisi){
try {Connection c = koneksi.getkoneksi();
String sql = "UPDATE kode SET stock = ? WHERE kd_brg=?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setInt(1, stok);
p.setString(2, kondisi);
p.executeUpdate();
}}catch(SQLException e){}}
public void updateharga(String produk,String nom, String hargabeli,String hargajual,String kondisi){
try {Connection c = koneksi.getkoneksi();
String sql = "UPDATE kode SET id_produk=?,id_nominal=?,harga_beli=?,harga_jual=? WHERE kd_brg=?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, produk);
p.setString(2, nom);
p.setString(3, hargabeli);
p.setString(4, hargajual);
p.setString(5, kondisi);
p.executeUpdate();
}}catch(SQLException e){}
}
public void tambahharga(String produk,String nominal,int hargajual,int hargabeli){
try{Connection c = koneksi.getkoneksi();
String sql = "Insert into kode values(?,?,?,?,?,?) ";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, produk+nominal);
p.setString(2, produk);
p.setString(3, nominal);
p.setInt(4, hargabeli);
p.setInt(5, hargajual);
p.setInt(6, 0);
p.executeUpdate();
}
}catch(SQLException e){System.out.println(e);}
}
public final void loadnominal (){
try {
model1.getDataVector().removeAllElements();
model1.fireTableDataChanged();
Connection c = koneksi.getkoneksi();
String sql = "SELECT * FROM nominal order by nominal asc";
Statement s = c.createStatement();
try (ResultSet r = s.executeQuery(sql)) {
Kodenom.removeAllItems();
Kodenom.addItem("Pilih kode Nominal");
while (r.next()){
Object [] o = new Object [2];
o[0]=r.getString(1);
o[1]=r.getString(2);
model1.addRow(o);
Kodenom.addItem(r.getObject(1));
}
}}catch(SQLException e){System.out.println("Terjadi error");}
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup();
Jtab1 = new javax.swing.JTabbedPane();
jPanel1 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
List_produk = new javax.swing.JTable();
jPanel8 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
txtkdpro = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
txtnmpro = new javax.swing.JTextField();
jPanel11 = new javax.swing.JPanel();
jButton7 = new javax.swing.JButton();
jButton8 = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
jScrollPane2 = new javax.swing.JScrollPane();
List_nominal = new javax.swing.JTable();
jPanel9 = new javax.swing.JPanel();
jButton3 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();
Kodenomi = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
txtnomi = new javax.swing.JTextField();
jPanel12 = new javax.swing.JPanel();
jButton9 = new javax.swing.JButton();
jButton10 = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
jScrollPane3 = new javax.swing.JScrollPane();
tb_harga = new javax.swing.JTable();
jPanel10 = new javax.swing.JPanel();
jButton5 = new javax.swing.JButton();
jButton6 = new javax.swing.JButton();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
Kodepro = new javax.swing.JComboBox();
Kodenom = new javax.swing.JComboBox();
jLabel7 = new javax.swing.JLabel();
txthargajual = new javax.swing.JTextField();
lblketpro = new javax.swing.JTextField();
lblketnom = new javax.swing.JTextField();
txthargabeli = new javax.swing.JTextField();
jLabel8 = new javax.swing.JLabel();
jPanel13 = new javax.swing.JPanel();
jButton11 = new javax.swing.JButton();
jButton12 = new javax.swing.JButton();
jPanel4 = new javax.swing.JPanel();
jScrollPane4 = new javax.swing.JScrollPane();
Stock = new javax.swing.JTable();
jButton13 = new javax.swing.JButton();
jButton14 = new javax.swing.JButton();
jPanel5 = new javax.swing.JPanel();
jScrollPane5 = new javax.swing.JScrollPane();
tbpenjualan = new javax.swing.JTable();
jPanel6 = new javax.swing.JPanel();
hari = new javax.swing.JRadioButton();
bulan = new javax.swing.JRadioButton();
Tahun = new javax.swing.JRadioButton();
pildate = new com.toedter.calendar.JDateChooser();
jPanel7 = new javax.swing.JPanel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jButton15 = new javax.swing.JButton();
laba = new javax.swing.JFormattedTextField();
totpend = new javax.swing.JFormattedTextField();
jmltrx = new javax.swing.JTextField();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenuItem1 = new javax.swing.JMenuItem();
jMenuItem2 = new javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
jMenuItem3 = new javax.swing.JMenuItem();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Admin");
setBounds(new java.awt.Rectangle(300, 0, 0, 0));
setResizable(false);
Jtab1.setFont(new java.awt.Font("Trebuchet MS", 0, 12)); // NOI18N
List_produk.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
List_produk.setFillsViewportHeight(true);
jScrollPane1.setViewportView(List_produk);
jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder("Tambah Data"));
jButton1.setText("Tambah");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setText("Batal");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel1.setText("Kode Produk");
txtkdpro.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel2.setText("Nama Produk");
txtnmpro.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
jPanel8.setLayout(jPanel8Layout);
jPanel8Layout.setHorizontalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addComponent(jLabel2)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(jPanel8Layout.createSequentialGroup()
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(txtnmpro, javax.swing.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtkdpro))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE)
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jButton1, 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))))
.addContainerGap())
);
jPanel8Layout.setVerticalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtkdpro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtnmpro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton2))
.addContainerGap(26, Short.MAX_VALUE))
);
jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder("Save & Delete"));
jButton7.setText("Save");
jButton7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton7ActionPerformed(evt);
}
});
jButton8.setText("Delete");
jButton8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton8ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
jPanel11.setLayout(jPanel11Layout);
jPanel11Layout.setHorizontalGroup(
jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel11Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 139, Short.MAX_VALUE)
.addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel11Layout.setVerticalGroup(
jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel11Layout.createSequentialGroup()
.addGap(48, 48, 48)
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton7)
.addComponent(jButton8))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
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)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(27, 27, 27)
.addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 41, Short.MAX_VALUE))
.addComponent(jScrollPane1))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 338, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(45, Short.MAX_VALUE))
);
Jtab1.addTab("List produk", jPanel1);
List_nominal.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
List_nominal.setFillsViewportHeight(true);
jScrollPane2.setViewportView(List_nominal);
jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder("Tambah Data"));
jButton3.setText("Tambah");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jButton4.setText("Batal");
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel3.setText("Kode Nominal");
Kodenomi.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel4.setText("Nominal");
txtnomi.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
jPanel9.setLayout(jPanel9Layout);
jPanel9Layout.setHorizontalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addComponent(jLabel4)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(jPanel9Layout.createSequentialGroup()
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(txtnomi, javax.swing.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE)
.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(Kodenomi))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE)
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.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))))
.addContainerGap())
);
jPanel9Layout.setVerticalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Kodenomi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton3))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtnomi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton4))
.addContainerGap(26, Short.MAX_VALUE))
);
jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder("Save & Delete"));
jButton9.setText("Save");
jButton9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton9ActionPerformed(evt);
}
});
jButton10.setText("Delete");
jButton10.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton10ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
jPanel12.setLayout(jPanel12Layout);
jPanel12Layout.setHorizontalGroup(
jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel12Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 139, Short.MAX_VALUE)
.addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel12Layout.setVerticalGroup(
jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel12Layout.createSequentialGroup()
.addGap(48, 48, 48)
.addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton9)
.addComponent(jButton10))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
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)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(27, 27, 27)
.addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 41, Short.MAX_VALUE))
.addComponent(jScrollPane2))
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 338, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(0, 45, Short.MAX_VALUE))
);
Jtab1.addTab("List nominal", jPanel2);
tb_harga.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
tb_harga.setFillsViewportHeight(true);
jScrollPane3.setViewportView(tb_harga);
jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder("Tambah Data"));
jButton5.setText("Tambah");
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
jButton6.setText("Batal");
jButton6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton6ActionPerformed(evt);
}
});
jLabel5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel5.setText("Kode Produk");
jLabel6.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel6.setText("Kode Nominal");
Kodepro.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
Kodepro.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
Kodepro.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
KodeproItemStateChanged(evt);
}
});
Kodenom.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
Kodenom.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
Kodenom.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
KodenomItemStateChanged(evt);
}
});
jLabel7.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel7.setText("Harga Jual");
txthargajual.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
lblketpro.setEditable(false);
lblketpro.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
lblketpro.setText("jTextField1");
lblketnom.setEditable(false);
lblketnom.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
lblketnom.setText("jTextField1");
txthargabeli.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel8.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel8.setText("Harga Beli");
javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
jPanel10.setLayout(jPanel10Layout);
jPanel10Layout.setHorizontalGroup(
jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel10Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(jPanel10Layout.createSequentialGroup()
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(txthargabeli, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(jPanel10Layout.createSequentialGroup()
.addComponent(jLabel7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(txthargajual, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(Kodenom, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel10Layout.createSequentialGroup()
.addComponent(jLabel5)
.addGap(18, 18, 18)
.addComponent(Kodepro, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addComponent(jLabel6)))
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel10Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(lblketpro, javax.swing.GroupLayout.DEFAULT_SIZE, 151, Short.MAX_VALUE)
.addComponent(lblketnom))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel10Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 176, Short.MAX_VALUE)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(24, 24, 24))))
);
jPanel10Layout.setVerticalGroup(
jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel10Layout.createSequentialGroup()
.addGap(3, 3, 3)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(Kodepro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton5)
.addComponent(lblketpro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(Kodenom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblketnom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton6)
.addComponent(txthargabeli, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel8))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txthargajual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel7))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder("Save & Delete"));
jButton11.setText("Save");
jButton11.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton11ActionPerformed(evt);
}
});
jButton12.setText("Delete");
jButton12.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton12ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
jPanel13.setLayout(jPanel13Layout);
jPanel13Layout.setHorizontalGroup(
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel13Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel13Layout.setVerticalGroup(
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel13Layout.createSequentialGroup()
.addGap(48, 48, 48)
.addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton11)
.addComponent(jButton12))
.addContainerGap(51, Short.MAX_VALUE))
);
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 7, Short.MAX_VALUE))
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jScrollPane3)
.addContainerGap())))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 340, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE)
.addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(59, Short.MAX_VALUE))
);
Jtab1.addTab("Elektrik/voucher harga", jPanel3);
Stock.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
Stock.setFillsViewportHeight(true);
jScrollPane4.setViewportView(Stock);
jButton13.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jButton13.setText("Save");
jButton13.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton13ActionPerformed(evt);
}
});
jButton14.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jButton14.setText("Refresh All");
jButton14.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton14ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 790, Short.MAX_VALUE)
.addContainerGap())
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(65, 65, 65)
.addComponent(jButton14)
.addGap(27, 27, 27))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE)
.addGap(18, 18, 18)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton14, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(31, 31, 31))
);
Jtab1.addTab("Stock voucher", jPanel4);
tbpenjualan.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
tbpenjualan.setFillsViewportHeight(true);
jScrollPane5.setViewportView(tbpenjualan);
buttonGroup1.add(hari);
hari.setText("Per Hari");
hari.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
hariActionPerformed(evt);
}
});
buttonGroup1.add(bulan);
bulan.setText("Per bulan");
bulan.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bulanActionPerformed(evt);
}
});
buttonGroup1.add(Tahun);
Tahun.setText("Per Tahun");
Tahun.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
TahunActionPerformed(evt);
}
});
pildate.setDateFormatString("yyyy-MM-dd");
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
jPanel6.setLayout(jPanel6Layout);
jPanel6Layout.setHorizontalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addComponent(hari)
.addGap(34, 34, 34)
.addComponent(pildate, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE))
.addGroup(jPanel6Layout.createSequentialGroup()
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(bulan)
.addComponent(Tahun))
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(hari)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(bulan)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(Tahun)
.addGap(24, 24, 24))
.addGroup(jPanel6Layout.createSequentialGroup()
.addComponent(pildate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
);
jLabel9.setText("Total pendapatan :");
jLabel10.setText("Jumlah transaksi :");
jLabel11.setText("Laba :");
jButton15.setText("File Output");
jButton15.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton15ActionPerformed(evt);
}
});
laba.setEditable(false);
laba.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
laba.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
labaActionPerformed(evt);
}
});
totpend.setEditable(false);
totpend.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jmltrx.setEditable(false);
jmltrx.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
jPanel7.setLayout(jPanel7Layout);
jPanel7Layout.setHorizontalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel10)
.addComponent(jLabel9))
.addGap(9, 9, 9)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jmltrx, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)
.addComponent(totpend)))
.addGroup(jPanel7Layout.createSequentialGroup()
.addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(laba, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 107, Short.MAX_VALUE)
.addComponent(jButton15)
.addContainerGap())
);
jPanel7Layout.setVerticalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel9)
.addComponent(jButton15)
.addComponent(totpend, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel10)
.addComponent(jmltrx, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(8, 8, 8)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel11)
.addComponent(laba, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 790, Short.MAX_VALUE)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addContainerGap())
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 7, Short.MAX_VALUE)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
Jtab1.addTab("Penjualan", jPanel5);
jMenu1.setText("Registration");
jMenuItem1.setText("Admin");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem1ActionPerformed(evt);
}
});
jMenu1.add(jMenuItem1);
jMenuItem2.setText("Ganti pin");
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem2ActionPerformed(evt);
}
});
jMenu1.add(jMenuItem2);
jMenuBar1.add(jMenu1);
jMenu2.setText("Edit");
jMenuItem3.setText("Edit sms center (elektrik)");
jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem3ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem3);
jMenuBar1.add(jMenu2);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(Jtab1, javax.swing.GroupLayout.PREFERRED_SIZE, 815, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(Jtab1)
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
new GantiPin().setVisible(true);
}//GEN-LAST:event_jMenuItem2ActionPerformed
public void deleteharga(int rows){
try {Connection c = koneksi.getkoneksi();
String no = model2.getValueAt(rows,0).toString();
String sql = "delete from kode WHERE kd_brg= ?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, no);
p.executeUpdate();
}}catch(SQLException e){}
}
private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed
if(tb_harga.getSelectedRow()>=0){
int i = JOptionPane.showConfirmDialog( null,"Anda yakin ingin menghapus ?", "Konfirmasi",0);
if(i==0){
for(int j=0;j<tb_harga.getSelectedRowCount();j++){
deleteharga(tb_harga.getSelectedRows()[j]);
}}}loadall();
}//GEN-LAST:event_jButton12ActionPerformed
private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
if (tb_harga.getSelectedRow()>=0){
int n=0;
try{
Connection c = koneksi.getkoneksi();
String sql = "SELECT kd_brg,id_produk,id_nominal,harga_beli,harga_jual FROM kode order by id_produk asc";
Statement s = c.createStatement();
s.executeQuery(sql);
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
if((r.getObject(2)!=model2.getValueAt(n, 1)||
(r.getObject(3)!=model2.getValueAt(n, 2))||
(r.getObject(3)!=model2.getValueAt(n, 3))||
(r.getObject(3)!=model2.getValueAt(n, 4)))){
updateharga(model2.getValueAt(n, 1).toString(),
model2.getValueAt(n, 2).toString(),
model2.getValueAt(n, 3).toString(),
model2.getValueAt(n, 4).toString(),
r.getString(1));
n++;
System.out.print(r.getString(1));
}
}
}}
catch(SQLException e){System.out.println(e);} finally{loadall();}
}
}//GEN-LAST:event_jButton11ActionPerformed
private void KodenomItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_KodenomItemStateChanged
if(Kodenom.getSelectedIndex()>=1){
String nmpro=Kodenom.getSelectedItem().toString();
try{
Connection c = koneksi.getkoneksi();
String sql = "SELECT nominal FROM nominal where id_nominal="+"'"+nmpro+"'";
Statement s = c.createStatement();
s.executeQuery(sql);
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
lblketnom.setText(r.getString(1));
} }
}
catch(SQLException e){System.out.println(e);}
} else {lblketnom.setText("");}
}//GEN-LAST:event_KodenomItemStateChanged
private void KodeproItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_KodeproItemStateChanged
if(Kodepro.getSelectedIndex()>=1){
String nmpro=Kodepro.getSelectedItem().toString();
try{
Connection c = koneksi.getkoneksi();
String sql = "SELECT nm_produk FROM produk where id_produk="+"'"+nmpro+"'";
Statement s = c.createStatement();
s.executeQuery(sql);
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
lblketpro.setText(r.getString(1));
} }
}
catch(SQLException e){System.out.println(e);}
} else {lblketpro.setText("");}
}//GEN-LAST:event_KodeproItemStateChanged
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
if((Kodenom.getSelectedIndex()>=1)&&(Kodepro.getSelectedIndex()>=1)){
if((!"".equals(txthargajual.getText()))&&(!"".equals(txthargabeli.getText()))){
tambahharga(Kodepro.getSelectedItem().toString(),Kodenom.getSelectedItem().toString(),
Integer.parseInt(txthargajual.getText()),Integer.parseInt(txthargabeli.getText()));
txthargajual.setText("");txthargabeli.setText("");
loadall();
}
}
}//GEN-LAST:event_jButton5ActionPerformed
public void delete(int row){
try {Connection c = koneksi.getkoneksi();
String no = model1.getValueAt(row,0).toString();
String sql = "delete from nominal WHERE id_nominal= ?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, no);
p.executeUpdate();
}}catch(SQLException e){}
}
private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
if(List_nominal.getSelectedRow()>=0){
int i = JOptionPane.showConfirmDialog( null,"Anda yakin ingin menghapus ?", "Konfirmasi",0);
if(i==0){
for(int j=0;j<List_nominal.getSelectedRowCount();j++){
delete(List_nominal.getSelectedRows()[j]);
}
}}loadall();
}//GEN-LAST:event_jButton10ActionPerformed
private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
if (List_nominal.getSelectedRow()>=0){
int n=0;
try{
Connection c = koneksi.getkoneksi();
String sql = "SELECT * FROM nominal order by nominal asc";
Statement s = c.createStatement();
s.executeQuery(sql);
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
updatenom(model1.getValueAt(n, 0).toString(),r.getString(1));
updatenominal(model1.getValueAt(n, 0).toString(),model1.getValueAt(n, 1).toString(),r.getString(1));
n++;
System.out.println(n);
}
}}
catch(SQLException e){System.out.println(e);} finally{loadall();}
}
}//GEN-LAST:event_jButton9ActionPerformed
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
Kodenomi.setText("");
txtnomi.setText("");
}//GEN-LAST:event_jButton4ActionPerformed
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
if ((!"".equals(txtnomi.getText()))&&(!"".equals(Kodenomi.getText()))){
tambahnominal(Kodenomi.getText(),txtnomi.getText());loadall();
txtnomi.setText("");Kodenomi.setText("");
}
}//GEN-LAST:event_jButton3ActionPerformed
private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
if(List_produk.getSelectedRow()>=0){
int i = JOptionPane.showConfirmDialog( null,"Anda yakin ingin menghapus ?", "Konfirmasi",0);
if(i==0){try {Connection c = koneksi.getkoneksi();
String no = model.getValueAt(List_produk.getSelectedRow(),0).toString();
String sql = "delete from produk WHERE id_produk= ?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, no);
p.executeUpdate();
}}catch(SQLException e){}finally{loadproduk();}
}}
}//GEN-LAST:event_jButton8ActionPerformed
private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
if (List_produk.getSelectedRow()>=0){
int n=0;
try{
Connection c = koneksi.getkoneksi();
String sql = "SELECT * FROM produk order by id_produk asc";
Statement s = c.createStatement();
s.executeQuery(sql);
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
updateproharga(model.getValueAt(n, 0).toString(),r.getString(1));
updateproduk(model.getValueAt(n, 0).toString(),model.getValueAt(n, 1).toString(),r.getString(1));
n++;
System.out.println(n);
} }
}
catch(SQLException e){System.out.println(e);} finally{loadall();}
}
}//GEN-LAST:event_jButton7ActionPerformed
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
txtkdpro.setText("");
txtnmpro.setText("");
}//GEN-LAST:event_jButton2ActionPerformed
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
if((!"".equals(txtkdpro.getText()))&&(!"".equals(txtnmpro.getText()))){
String o =txtkdpro.getText();
String p =txtnmpro.getText();
tambahproduk(o,p);
}
txtkdpro.setText("");
txtnmpro.setText("");
loadall();
}//GEN-LAST:event_jButton1ActionPerformed
private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed
if (Stock.getSelectedRow()>=0){
int n=0;
try{
Connection c = koneksi.getkoneksi();
String sql = "SELECT kd_brg,stock FROM kode order by id_produk asc";
Statement s = c.createStatement();
s.executeQuery(sql);
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
if(model3.getValueAt(n, 1)!=r.getString(2)){
updatestok(Integer.parseInt(model3.getValueAt(n, 2).toString()
),model3.getValueAt(n, 0).toString());
System.out.println(n);
n++;
} }
}}
catch(SQLException e){System.out.println(e);} finally{loadall();}
}
}//GEN-LAST:event_jButton13ActionPerformed
private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed
loadall();
}//GEN-LAST:event_jButton14ActionPerformed
private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
txthargabeli.setText("");
txthargajual.setText("");
}//GEN-LAST:event_jButton6ActionPerformed
private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
new Euserpass().setVisible(true);
}//GEN-LAST:event_jMenuItem1ActionPerformed
private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
new Editsmsc().setVisible(true);
}//GEN-LAST:event_jMenuItem3ActionPerformed
private void labaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_labaActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_labaActionPerformed
private void hariActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hariActionPerformed
if (hari.isSelected()){
if (cekpildate()==1){
String txtdate=new SimpleDateFormat("yyyy-MM-dd").format(pildate.getDate());
tanggal = txtdate.split("-")[0]+"-"+txtdate.split("-")[1]+"-"+txtdate.split("-")[2];
penjualan(tanggal);
}
}
}//GEN-LAST:event_hariActionPerformed
private void bulanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bulanActionPerformed
if (bulan.isSelected()){
if (cekpildate()==1){
String txtdate=new SimpleDateFormat("yyyy-MM-dd").format(pildate.getDate());
tanggal =txtdate.split("-")[0]+"-"+ txtdate.split("-")[1]+"-%%";
penjualan(tanggal);
}
}
}//GEN-LAST:event_bulanActionPerformed
private void TahunActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TahunActionPerformed
if (Tahun.isSelected()){
if (cekpildate()==1){
String txtdate=new SimpleDateFormat("yyyy-MM-dd").format(pildate.getDate());
tanggal =txtdate.split("-")[0]+"-%%"+"-%%";}
penjualan(tanggal);}
}//GEN-LAST:event_TahunActionPerformed
private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton15ActionPerformed
new Report_controler().Showreport(tanggal);
}//GEN-LAST:event_jButton15ActionPerformed
public void updateproharga(String kode,String kondisi){
try {Connection c = koneksi.getkoneksi();
String sql = "UPDATE kode SET id_produk =? WHERE id_produk=?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, kode);
p.setString(2, kondisi);
p.executeUpdate();
}}catch(SQLException e){}
}
public void updatenom(String kode, String kondisi){
try {Connection c = koneksi.getkoneksi();
String sql = "UPDATE kode SET id_nominal =? WHERE id_nominal=?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, kode);
p.setString(2, kondisi);
p.executeUpdate();
}}catch(SQLException e){}
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JTabbedPane Jtab1;
private javax.swing.JComboBox Kodenom;
private javax.swing.JTextField Kodenomi;
private javax.swing.JComboBox Kodepro;
private javax.swing.JTable List_nominal;
private javax.swing.JTable List_produk;
private javax.swing.JTable Stock;
private javax.swing.JRadioButton Tahun;
private javax.swing.JRadioButton bulan;
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JRadioButton hari;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton10;
private javax.swing.JButton jButton11;
private javax.swing.JButton jButton12;
private javax.swing.JButton jButton13;
private javax.swing.JButton jButton14;
private javax.swing.JButton jButton15;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
private javax.swing.JButton jButton6;
private javax.swing.JButton jButton7;
private javax.swing.JButton jButton8;
private javax.swing.JButton jButton9;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
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;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem jMenuItem1;
private javax.swing.JMenuItem jMenuItem2;
private javax.swing.JMenuItem jMenuItem3;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel10;
private javax.swing.JPanel jPanel11;
private javax.swing.JPanel jPanel12;
private javax.swing.JPanel jPanel13;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JPanel jPanel6;
private javax.swing.JPanel jPanel7;
private javax.swing.JPanel jPanel8;
private javax.swing.JPanel jPanel9;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JScrollPane jScrollPane4;
private javax.swing.JScrollPane jScrollPane5;
private javax.swing.JTextField jmltrx;
private javax.swing.JFormattedTextField laba;
private javax.swing.JTextField lblketnom;
private javax.swing.JTextField lblketpro;
public static com.toedter.calendar.JDateChooser pildate;
private javax.swing.JTable tb_harga;
private javax.swing.JTable tbpenjualan;
private javax.swing.JFormattedTextField totpend;
private javax.swing.JTextField txthargabeli;
private javax.swing.JTextField txthargajual;
private javax.swing.JTextField txtkdpro;
private javax.swing.JTextField txtnmpro;
private javax.swing.JTextField txtnomi;
// End of variables declaration//GEN-END:variables
}
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
/**
*
* @author azhar
*/
public class Admin_form extends javax.swing.JFrame {
/**
* Creates new form Admin_form
*/
String tanggal;
DefaultTableModel model,model1,model2,model3,model4;
public Admin_form() {
initComponents();
loadall();
}
int cekpildate(){
int n=1;
if (pildate.getDate()==null){
n=0;
JOptionPane.showMessageDialog(null, "Pilih dulu tanggalnya","Error",0);
}
return n;
}
public final void loadproduk (){
try {
model.getDataVector().removeAllElements();
model.fireTableDataChanged();
Connection c = koneksi.getkoneksi();
String sql = "SELECT * FROM produk order by id_produk asc";
Statement s = c.createStatement();
try (ResultSet r = s.executeQuery(sql)) {
Kodepro.removeAllItems();
Kodepro.addItem("Pilih kode produk");
while (r.next()){
Object [] o = new Object [2];
o[0]=r.getString(1);
o[1]=r.getString(2);
Kodepro.addItem(r.getObject(1));
model.addRow(o);
}
}}catch(SQLException e){System.out.println("Terjadi error");}
}
public final void voucher(){
try {
model3.getDataVector().removeAllElements();
model3.fireTableDataChanged();
Connection c = koneksi.getkoneksi();
String sql = "SELECT kd_brg,nm_produk,nominal.id_nominal,stock FROM kode,produk,nominal where kode.id_produk=produk.Id_produk and kode.id_nominal=nominal.id_nominal order by nm_produk asc";
Statement s = c.createStatement();
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
Object [] o = new Object [3];
o[0]=r.getString(1);
o[1]=r.getString(2)+" "+r.getString(3);
o[2]=r.getInt(4);
model3.addRow(o);
}
}}catch(SQLException e){System.out.println("Terjadi error");}}
public final void loadall(){
model = new DefaultTableModel ();
model1 = new DefaultTableModel ();
model2 = new DefaultTableModel ();
model3 = new DefaultTableModel ();
model4 = new DefaultTableModel ();
List_nominal.setModel(model1);
List_produk.setModel(model);
Stock.setModel(model3);
tb_harga.setModel(model2);
tbpenjualan.setModel(model4);
model.addColumn("Kode Produk");
model.addColumn("Nama Produk");
model1.addColumn("Kode Nominal");
model1.addColumn("Nominal");
model2.addColumn("Kode barang");
model2.addColumn("kode produk");
model2.addColumn("kode nominal");
model2.addColumn("harga beli");
model2.addColumn("harga jual");
model3.addColumn("Kode Barang");
model3.addColumn("Nama Produk");
model3.addColumn("Stok");
model4.addColumn("Tanggal");
model4.addColumn("Nama Produk");
model4.addColumn("Total");
voucher();
loadproduk();
loadnominal();
loadharga();
penjualan();
}
public void penjualan(String tgl){
try { int totbel=0,totjual=0;
model4.getDataVector().removeAllElements();
model4.fireTableDataChanged();
Connection c = koneksi.getkoneksi();
String sql = "SELECT date,nama_voucher,harga_jual*quantity as tot,"
+ " harga_beli*quantity as totbel FROM transaksi,kode where transaksi.kd_brg=kode.kd_brg and "
+ "status='d'and date like '"+tgl+"'"
+"order by date desc";
Statement s = c.createStatement();
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
Object [] o = new Object [3];
o[0]=r.getString(1);
o[1]=r.getString(2);
o[2]=r.getString(3);
totbel=totbel+r.getInt(4);
totjual=totjual+r.getInt(3);
model4.addRow(o);
}
}
totpend.setValue(totjual);
laba.setValue(totjual-totbel);
jmltrx.setText(String.valueOf(model4.getRowCount()));
}catch(SQLException e){System.out.println("Terjadi error");}
}
public final void penjualan(){
try { int totbel=0,totjual=0;
model4.getDataVector().removeAllElements();
model4.fireTableDataChanged();
Connection c = koneksi.getkoneksi();
String sql = "SELECT date,nama_voucher,harga_jual*quantity as tot,"
+ " harga_beli*quantity as totbel FROM transaksi,kode where transaksi.kd_brg=kode.kd_brg and status='d'"
+"order by date desc";
SimpleDateFormat a = new SimpleDateFormat("yyyy-MM-dd");
Statement s = c.createStatement();
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
Object [] o = new Object [3];
o[0]=r.getString(1);
o[1]=r.getString(2);
o[2]=r.getString(3);
totbel=totbel+r.getInt(4);
totjual=totjual+r.getInt(3);
model4.addRow(o);
}
try {
pildate.setMinSelectableDate(a.parse("2012-01-01"));
} catch (ParseException ex) {
Logger.getLogger(Admin_form.class.getName()).log(Level.SEVERE, null, ex);
}
}
totpend.setValue(totjual);
laba.setValue(totjual-totbel);
jmltrx.setText(String.valueOf(model4.getRowCount()));
}catch(SQLException e){System.out.println("Terjadi error");}
}
public final void loadharga(){
try {
model2.getDataVector().removeAllElements();
model2.fireTableDataChanged();
Connection c = koneksi.getkoneksi();
String sql = "SELECT kd_brg,id_produk,id_nominal,harga_beli,harga_jual FROM kode order by id_produk asc";
Statement s = c.createStatement();
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
Object [] o = new Object [5];
o[0]=r.getString(1);
o[1]=r.getString(2);
o[2]=r.getString(3);
o[3]=r.getInt(4);
o[4]=r.getInt(5);
model2.addRow(o);
}
}}catch(SQLException e){System.out.println("Terjadi error");}
}
public final void tambahproduk(String kode,String produk){
try{Connection c = koneksi.getkoneksi();
String sql = "Insert into produk values(?,?) ";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, kode);
p.setString(2, produk);
p.executeUpdate();
}
}catch(SQLException e){System.out.println("Terjadi error");}
}
public void updateproduk(String kode,String produk,String kondisi){
try {Connection c = koneksi.getkoneksi();
String sql = "UPDATE produk SET id_produk = ?,nm_produk=? WHERE id_produk=?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, kode);
p.setString(2, produk);
p.setString(3, kondisi);
p.executeUpdate();
}}catch(SQLException e){}}
public void tambahnominal(String kode,String nominal){
try{Connection c = koneksi.getkoneksi();
String sql = "Insert into nominal values(?,?) ";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, kode);
p.setString(2, nominal);
p.executeUpdate();
}
}catch(SQLException e){System.out.println("Terjadi error");}}
public void updatenominal(String kode,String nominal,String kondisi){
try {Connection c = koneksi.getkoneksi();
String sql = "UPDATE nominal SET id_nominal = ?,nominal=? WHERE id_nominal=?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, kode);
p.setString(2, nominal);
p.setString(3, kondisi);
p.executeUpdate();
}}catch(SQLException e){}
}
public void updatestok(int stok,String kondisi){
try {Connection c = koneksi.getkoneksi();
String sql = "UPDATE kode SET stock = ? WHERE kd_brg=?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setInt(1, stok);
p.setString(2, kondisi);
p.executeUpdate();
}}catch(SQLException e){}}
public void updateharga(String produk,String nom, String hargabeli,String hargajual,String kondisi){
try {Connection c = koneksi.getkoneksi();
String sql = "UPDATE kode SET id_produk=?,id_nominal=?,harga_beli=?,harga_jual=? WHERE kd_brg=?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, produk);
p.setString(2, nom);
p.setString(3, hargabeli);
p.setString(4, hargajual);
p.setString(5, kondisi);
p.executeUpdate();
}}catch(SQLException e){}
}
public void tambahharga(String produk,String nominal,int hargajual,int hargabeli){
try{Connection c = koneksi.getkoneksi();
String sql = "Insert into kode values(?,?,?,?,?,?) ";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, produk+nominal);
p.setString(2, produk);
p.setString(3, nominal);
p.setInt(4, hargabeli);
p.setInt(5, hargajual);
p.setInt(6, 0);
p.executeUpdate();
}
}catch(SQLException e){System.out.println(e);}
}
public final void loadnominal (){
try {
model1.getDataVector().removeAllElements();
model1.fireTableDataChanged();
Connection c = koneksi.getkoneksi();
String sql = "SELECT * FROM nominal order by nominal asc";
Statement s = c.createStatement();
try (ResultSet r = s.executeQuery(sql)) {
Kodenom.removeAllItems();
Kodenom.addItem("Pilih kode Nominal");
while (r.next()){
Object [] o = new Object [2];
o[0]=r.getString(1);
o[1]=r.getString(2);
model1.addRow(o);
Kodenom.addItem(r.getObject(1));
}
}}catch(SQLException e){System.out.println("Terjadi error");}
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup();
Jtab1 = new javax.swing.JTabbedPane();
jPanel1 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
List_produk = new javax.swing.JTable();
jPanel8 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
txtkdpro = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
txtnmpro = new javax.swing.JTextField();
jPanel11 = new javax.swing.JPanel();
jButton7 = new javax.swing.JButton();
jButton8 = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
jScrollPane2 = new javax.swing.JScrollPane();
List_nominal = new javax.swing.JTable();
jPanel9 = new javax.swing.JPanel();
jButton3 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();
Kodenomi = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
txtnomi = new javax.swing.JTextField();
jPanel12 = new javax.swing.JPanel();
jButton9 = new javax.swing.JButton();
jButton10 = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
jScrollPane3 = new javax.swing.JScrollPane();
tb_harga = new javax.swing.JTable();
jPanel10 = new javax.swing.JPanel();
jButton5 = new javax.swing.JButton();
jButton6 = new javax.swing.JButton();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
Kodepro = new javax.swing.JComboBox();
Kodenom = new javax.swing.JComboBox();
jLabel7 = new javax.swing.JLabel();
txthargajual = new javax.swing.JTextField();
lblketpro = new javax.swing.JTextField();
lblketnom = new javax.swing.JTextField();
txthargabeli = new javax.swing.JTextField();
jLabel8 = new javax.swing.JLabel();
jPanel13 = new javax.swing.JPanel();
jButton11 = new javax.swing.JButton();
jButton12 = new javax.swing.JButton();
jPanel4 = new javax.swing.JPanel();
jScrollPane4 = new javax.swing.JScrollPane();
Stock = new javax.swing.JTable();
jButton13 = new javax.swing.JButton();
jButton14 = new javax.swing.JButton();
jPanel5 = new javax.swing.JPanel();
jScrollPane5 = new javax.swing.JScrollPane();
tbpenjualan = new javax.swing.JTable();
jPanel6 = new javax.swing.JPanel();
hari = new javax.swing.JRadioButton();
bulan = new javax.swing.JRadioButton();
Tahun = new javax.swing.JRadioButton();
pildate = new com.toedter.calendar.JDateChooser();
jPanel7 = new javax.swing.JPanel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jButton15 = new javax.swing.JButton();
laba = new javax.swing.JFormattedTextField();
totpend = new javax.swing.JFormattedTextField();
jmltrx = new javax.swing.JTextField();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenuItem1 = new javax.swing.JMenuItem();
jMenuItem2 = new javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
jMenuItem3 = new javax.swing.JMenuItem();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Admin");
setBounds(new java.awt.Rectangle(300, 0, 0, 0));
setResizable(false);
Jtab1.setFont(new java.awt.Font("Trebuchet MS", 0, 12)); // NOI18N
List_produk.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
List_produk.setFillsViewportHeight(true);
jScrollPane1.setViewportView(List_produk);
jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder("Tambah Data"));
jButton1.setText("Tambah");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setText("Batal");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel1.setText("Kode Produk");
txtkdpro.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel2.setText("Nama Produk");
txtnmpro.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
jPanel8.setLayout(jPanel8Layout);
jPanel8Layout.setHorizontalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addComponent(jLabel2)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(jPanel8Layout.createSequentialGroup()
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(txtnmpro, javax.swing.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtkdpro))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE)
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jButton1, 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))))
.addContainerGap())
);
jPanel8Layout.setVerticalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtkdpro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtnmpro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton2))
.addContainerGap(26, Short.MAX_VALUE))
);
jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder("Save & Delete"));
jButton7.setText("Save");
jButton7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton7ActionPerformed(evt);
}
});
jButton8.setText("Delete");
jButton8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton8ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
jPanel11.setLayout(jPanel11Layout);
jPanel11Layout.setHorizontalGroup(
jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel11Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 139, Short.MAX_VALUE)
.addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel11Layout.setVerticalGroup(
jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel11Layout.createSequentialGroup()
.addGap(48, 48, 48)
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton7)
.addComponent(jButton8))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
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)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(27, 27, 27)
.addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 41, Short.MAX_VALUE))
.addComponent(jScrollPane1))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 338, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(45, Short.MAX_VALUE))
);
Jtab1.addTab("List produk", jPanel1);
List_nominal.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
List_nominal.setFillsViewportHeight(true);
jScrollPane2.setViewportView(List_nominal);
jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder("Tambah Data"));
jButton3.setText("Tambah");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jButton4.setText("Batal");
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel3.setText("Kode Nominal");
Kodenomi.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel4.setText("Nominal");
txtnomi.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
jPanel9.setLayout(jPanel9Layout);
jPanel9Layout.setHorizontalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addComponent(jLabel4)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(jPanel9Layout.createSequentialGroup()
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(txtnomi, javax.swing.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE)
.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(Kodenomi))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE)
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.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))))
.addContainerGap())
);
jPanel9Layout.setVerticalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Kodenomi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton3))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtnomi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton4))
.addContainerGap(26, Short.MAX_VALUE))
);
jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder("Save & Delete"));
jButton9.setText("Save");
jButton9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton9ActionPerformed(evt);
}
});
jButton10.setText("Delete");
jButton10.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton10ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
jPanel12.setLayout(jPanel12Layout);
jPanel12Layout.setHorizontalGroup(
jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel12Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 139, Short.MAX_VALUE)
.addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel12Layout.setVerticalGroup(
jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel12Layout.createSequentialGroup()
.addGap(48, 48, 48)
.addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton9)
.addComponent(jButton10))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
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)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(27, 27, 27)
.addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 41, Short.MAX_VALUE))
.addComponent(jScrollPane2))
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 338, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(0, 45, Short.MAX_VALUE))
);
Jtab1.addTab("List nominal", jPanel2);
tb_harga.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
tb_harga.setFillsViewportHeight(true);
jScrollPane3.setViewportView(tb_harga);
jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder("Tambah Data"));
jButton5.setText("Tambah");
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
jButton6.setText("Batal");
jButton6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton6ActionPerformed(evt);
}
});
jLabel5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel5.setText("Kode Produk");
jLabel6.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel6.setText("Kode Nominal");
Kodepro.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
Kodepro.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
Kodepro.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
KodeproItemStateChanged(evt);
}
});
Kodenom.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
Kodenom.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
Kodenom.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
KodenomItemStateChanged(evt);
}
});
jLabel7.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel7.setText("Harga Jual");
txthargajual.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
lblketpro.setEditable(false);
lblketpro.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
lblketpro.setText("jTextField1");
lblketnom.setEditable(false);
lblketnom.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
lblketnom.setText("jTextField1");
txthargabeli.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel8.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel8.setText("Harga Beli");
javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
jPanel10.setLayout(jPanel10Layout);
jPanel10Layout.setHorizontalGroup(
jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel10Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(jPanel10Layout.createSequentialGroup()
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(txthargabeli, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(jPanel10Layout.createSequentialGroup()
.addComponent(jLabel7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(txthargajual, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(Kodenom, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel10Layout.createSequentialGroup()
.addComponent(jLabel5)
.addGap(18, 18, 18)
.addComponent(Kodepro, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addComponent(jLabel6)))
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel10Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(lblketpro, javax.swing.GroupLayout.DEFAULT_SIZE, 151, Short.MAX_VALUE)
.addComponent(lblketnom))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel10Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 176, Short.MAX_VALUE)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(24, 24, 24))))
);
jPanel10Layout.setVerticalGroup(
jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel10Layout.createSequentialGroup()
.addGap(3, 3, 3)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(Kodepro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton5)
.addComponent(lblketpro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(Kodenom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblketnom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton6)
.addComponent(txthargabeli, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel8))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txthargajual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel7))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder("Save & Delete"));
jButton11.setText("Save");
jButton11.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton11ActionPerformed(evt);
}
});
jButton12.setText("Delete");
jButton12.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton12ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
jPanel13.setLayout(jPanel13Layout);
jPanel13Layout.setHorizontalGroup(
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel13Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel13Layout.setVerticalGroup(
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel13Layout.createSequentialGroup()
.addGap(48, 48, 48)
.addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton11)
.addComponent(jButton12))
.addContainerGap(51, Short.MAX_VALUE))
);
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 7, Short.MAX_VALUE))
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jScrollPane3)
.addContainerGap())))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 340, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE)
.addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(59, Short.MAX_VALUE))
);
Jtab1.addTab("Elektrik/voucher harga", jPanel3);
Stock.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
Stock.setFillsViewportHeight(true);
jScrollPane4.setViewportView(Stock);
jButton13.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jButton13.setText("Save");
jButton13.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton13ActionPerformed(evt);
}
});
jButton14.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jButton14.setText("Refresh All");
jButton14.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton14ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 790, Short.MAX_VALUE)
.addContainerGap())
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(65, 65, 65)
.addComponent(jButton14)
.addGap(27, 27, 27))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE)
.addGap(18, 18, 18)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton14, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(31, 31, 31))
);
Jtab1.addTab("Stock voucher", jPanel4);
tbpenjualan.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
tbpenjualan.setFillsViewportHeight(true);
jScrollPane5.setViewportView(tbpenjualan);
buttonGroup1.add(hari);
hari.setText("Per Hari");
hari.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
hariActionPerformed(evt);
}
});
buttonGroup1.add(bulan);
bulan.setText("Per bulan");
bulan.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bulanActionPerformed(evt);
}
});
buttonGroup1.add(Tahun);
Tahun.setText("Per Tahun");
Tahun.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
TahunActionPerformed(evt);
}
});
pildate.setDateFormatString("yyyy-MM-dd");
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
jPanel6.setLayout(jPanel6Layout);
jPanel6Layout.setHorizontalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addComponent(hari)
.addGap(34, 34, 34)
.addComponent(pildate, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE))
.addGroup(jPanel6Layout.createSequentialGroup()
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(bulan)
.addComponent(Tahun))
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(hari)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(bulan)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(Tahun)
.addGap(24, 24, 24))
.addGroup(jPanel6Layout.createSequentialGroup()
.addComponent(pildate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
);
jLabel9.setText("Total pendapatan :");
jLabel10.setText("Jumlah transaksi :");
jLabel11.setText("Laba :");
jButton15.setText("File Output");
jButton15.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton15ActionPerformed(evt);
}
});
laba.setEditable(false);
laba.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
laba.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
labaActionPerformed(evt);
}
});
totpend.setEditable(false);
totpend.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jmltrx.setEditable(false);
jmltrx.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
jPanel7.setLayout(jPanel7Layout);
jPanel7Layout.setHorizontalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel10)
.addComponent(jLabel9))
.addGap(9, 9, 9)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jmltrx, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)
.addComponent(totpend)))
.addGroup(jPanel7Layout.createSequentialGroup()
.addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(laba, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 107, Short.MAX_VALUE)
.addComponent(jButton15)
.addContainerGap())
);
jPanel7Layout.setVerticalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel9)
.addComponent(jButton15)
.addComponent(totpend, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel10)
.addComponent(jmltrx, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(8, 8, 8)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel11)
.addComponent(laba, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 790, Short.MAX_VALUE)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addContainerGap())
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 7, Short.MAX_VALUE)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
Jtab1.addTab("Penjualan", jPanel5);
jMenu1.setText("Registration");
jMenuItem1.setText("Admin");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem1ActionPerformed(evt);
}
});
jMenu1.add(jMenuItem1);
jMenuItem2.setText("Ganti pin");
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem2ActionPerformed(evt);
}
});
jMenu1.add(jMenuItem2);
jMenuBar1.add(jMenu1);
jMenu2.setText("Edit");
jMenuItem3.setText("Edit sms center (elektrik)");
jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem3ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem3);
jMenuBar1.add(jMenu2);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(Jtab1, javax.swing.GroupLayout.PREFERRED_SIZE, 815, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(Jtab1)
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
new GantiPin().setVisible(true);
}//GEN-LAST:event_jMenuItem2ActionPerformed
public void deleteharga(int rows){
try {Connection c = koneksi.getkoneksi();
String no = model2.getValueAt(rows,0).toString();
String sql = "delete from kode WHERE kd_brg= ?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, no);
p.executeUpdate();
}}catch(SQLException e){}
}
private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed
if(tb_harga.getSelectedRow()>=0){
int i = JOptionPane.showConfirmDialog( null,"Anda yakin ingin menghapus ?", "Konfirmasi",0);
if(i==0){
for(int j=0;j<tb_harga.getSelectedRowCount();j++){
deleteharga(tb_harga.getSelectedRows()[j]);
}}}loadall();
}//GEN-LAST:event_jButton12ActionPerformed
private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
if (tb_harga.getSelectedRow()>=0){
int n=0;
try{
Connection c = koneksi.getkoneksi();
String sql = "SELECT kd_brg,id_produk,id_nominal,harga_beli,harga_jual FROM kode order by id_produk asc";
Statement s = c.createStatement();
s.executeQuery(sql);
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
if((r.getObject(2)!=model2.getValueAt(n, 1)||
(r.getObject(3)!=model2.getValueAt(n, 2))||
(r.getObject(3)!=model2.getValueAt(n, 3))||
(r.getObject(3)!=model2.getValueAt(n, 4)))){
updateharga(model2.getValueAt(n, 1).toString(),
model2.getValueAt(n, 2).toString(),
model2.getValueAt(n, 3).toString(),
model2.getValueAt(n, 4).toString(),
r.getString(1));
n++;
System.out.print(r.getString(1));
}
}
}}
catch(SQLException e){System.out.println(e);} finally{loadall();}
}
}//GEN-LAST:event_jButton11ActionPerformed
private void KodenomItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_KodenomItemStateChanged
if(Kodenom.getSelectedIndex()>=1){
String nmpro=Kodenom.getSelectedItem().toString();
try{
Connection c = koneksi.getkoneksi();
String sql = "SELECT nominal FROM nominal where id_nominal="+"'"+nmpro+"'";
Statement s = c.createStatement();
s.executeQuery(sql);
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
lblketnom.setText(r.getString(1));
} }
}
catch(SQLException e){System.out.println(e);}
} else {lblketnom.setText("");}
}//GEN-LAST:event_KodenomItemStateChanged
private void KodeproItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_KodeproItemStateChanged
if(Kodepro.getSelectedIndex()>=1){
String nmpro=Kodepro.getSelectedItem().toString();
try{
Connection c = koneksi.getkoneksi();
String sql = "SELECT nm_produk FROM produk where id_produk="+"'"+nmpro+"'";
Statement s = c.createStatement();
s.executeQuery(sql);
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
lblketpro.setText(r.getString(1));
} }
}
catch(SQLException e){System.out.println(e);}
} else {lblketpro.setText("");}
}//GEN-LAST:event_KodeproItemStateChanged
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
if((Kodenom.getSelectedIndex()>=1)&&(Kodepro.getSelectedIndex()>=1)){
if((!"".equals(txthargajual.getText()))&&(!"".equals(txthargabeli.getText()))){
tambahharga(Kodepro.getSelectedItem().toString(),Kodenom.getSelectedItem().toString(),
Integer.parseInt(txthargajual.getText()),Integer.parseInt(txthargabeli.getText()));
txthargajual.setText("");txthargabeli.setText("");
loadall();
}
}
}//GEN-LAST:event_jButton5ActionPerformed
public void delete(int row){
try {Connection c = koneksi.getkoneksi();
String no = model1.getValueAt(row,0).toString();
String sql = "delete from nominal WHERE id_nominal= ?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, no);
p.executeUpdate();
}}catch(SQLException e){}
}
private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
if(List_nominal.getSelectedRow()>=0){
int i = JOptionPane.showConfirmDialog( null,"Anda yakin ingin menghapus ?", "Konfirmasi",0);
if(i==0){
for(int j=0;j<List_nominal.getSelectedRowCount();j++){
delete(List_nominal.getSelectedRows()[j]);
}
}}loadall();
}//GEN-LAST:event_jButton10ActionPerformed
private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
if (List_nominal.getSelectedRow()>=0){
int n=0;
try{
Connection c = koneksi.getkoneksi();
String sql = "SELECT * FROM nominal order by nominal asc";
Statement s = c.createStatement();
s.executeQuery(sql);
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
updatenom(model1.getValueAt(n, 0).toString(),r.getString(1));
updatenominal(model1.getValueAt(n, 0).toString(),model1.getValueAt(n, 1).toString(),r.getString(1));
n++;
System.out.println(n);
}
}}
catch(SQLException e){System.out.println(e);} finally{loadall();}
}
}//GEN-LAST:event_jButton9ActionPerformed
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
Kodenomi.setText("");
txtnomi.setText("");
}//GEN-LAST:event_jButton4ActionPerformed
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
if ((!"".equals(txtnomi.getText()))&&(!"".equals(Kodenomi.getText()))){
tambahnominal(Kodenomi.getText(),txtnomi.getText());loadall();
txtnomi.setText("");Kodenomi.setText("");
}
}//GEN-LAST:event_jButton3ActionPerformed
private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
if(List_produk.getSelectedRow()>=0){
int i = JOptionPane.showConfirmDialog( null,"Anda yakin ingin menghapus ?", "Konfirmasi",0);
if(i==0){try {Connection c = koneksi.getkoneksi();
String no = model.getValueAt(List_produk.getSelectedRow(),0).toString();
String sql = "delete from produk WHERE id_produk= ?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, no);
p.executeUpdate();
}}catch(SQLException e){}finally{loadproduk();}
}}
}//GEN-LAST:event_jButton8ActionPerformed
private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
if (List_produk.getSelectedRow()>=0){
int n=0;
try{
Connection c = koneksi.getkoneksi();
String sql = "SELECT * FROM produk order by id_produk asc";
Statement s = c.createStatement();
s.executeQuery(sql);
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
updateproharga(model.getValueAt(n, 0).toString(),r.getString(1));
updateproduk(model.getValueAt(n, 0).toString(),model.getValueAt(n, 1).toString(),r.getString(1));
n++;
System.out.println(n);
} }
}
catch(SQLException e){System.out.println(e);} finally{loadall();}
}
}//GEN-LAST:event_jButton7ActionPerformed
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
txtkdpro.setText("");
txtnmpro.setText("");
}//GEN-LAST:event_jButton2ActionPerformed
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
if((!"".equals(txtkdpro.getText()))&&(!"".equals(txtnmpro.getText()))){
String o =txtkdpro.getText();
String p =txtnmpro.getText();
tambahproduk(o,p);
}
txtkdpro.setText("");
txtnmpro.setText("");
loadall();
}//GEN-LAST:event_jButton1ActionPerformed
private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed
if (Stock.getSelectedRow()>=0){
int n=0;
try{
Connection c = koneksi.getkoneksi();
String sql = "SELECT kd_brg,stock FROM kode order by id_produk asc";
Statement s = c.createStatement();
s.executeQuery(sql);
try (ResultSet r = s.executeQuery(sql)) {
while (r.next()){
if(model3.getValueAt(n, 1)!=r.getString(2)){
updatestok(Integer.parseInt(model3.getValueAt(n, 2).toString()
),model3.getValueAt(n, 0).toString());
System.out.println(n);
n++;
} }
}}
catch(SQLException e){System.out.println(e);} finally{loadall();}
}
}//GEN-LAST:event_jButton13ActionPerformed
private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed
loadall();
}//GEN-LAST:event_jButton14ActionPerformed
private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
txthargabeli.setText("");
txthargajual.setText("");
}//GEN-LAST:event_jButton6ActionPerformed
private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
new Euserpass().setVisible(true);
}//GEN-LAST:event_jMenuItem1ActionPerformed
private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
new Editsmsc().setVisible(true);
}//GEN-LAST:event_jMenuItem3ActionPerformed
private void labaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_labaActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_labaActionPerformed
private void hariActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hariActionPerformed
if (hari.isSelected()){
if (cekpildate()==1){
String txtdate=new SimpleDateFormat("yyyy-MM-dd").format(pildate.getDate());
tanggal = txtdate.split("-")[0]+"-"+txtdate.split("-")[1]+"-"+txtdate.split("-")[2];
penjualan(tanggal);
}
}
}//GEN-LAST:event_hariActionPerformed
private void bulanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bulanActionPerformed
if (bulan.isSelected()){
if (cekpildate()==1){
String txtdate=new SimpleDateFormat("yyyy-MM-dd").format(pildate.getDate());
tanggal =txtdate.split("-")[0]+"-"+ txtdate.split("-")[1]+"-%%";
penjualan(tanggal);
}
}
}//GEN-LAST:event_bulanActionPerformed
private void TahunActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TahunActionPerformed
if (Tahun.isSelected()){
if (cekpildate()==1){
String txtdate=new SimpleDateFormat("yyyy-MM-dd").format(pildate.getDate());
tanggal =txtdate.split("-")[0]+"-%%"+"-%%";}
penjualan(tanggal);}
}//GEN-LAST:event_TahunActionPerformed
private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton15ActionPerformed
new Report_controler().Showreport(tanggal);
}//GEN-LAST:event_jButton15ActionPerformed
public void updateproharga(String kode,String kondisi){
try {Connection c = koneksi.getkoneksi();
String sql = "UPDATE kode SET id_produk =? WHERE id_produk=?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, kode);
p.setString(2, kondisi);
p.executeUpdate();
}}catch(SQLException e){}
}
public void updatenom(String kode, String kondisi){
try {Connection c = koneksi.getkoneksi();
String sql = "UPDATE kode SET id_nominal =? WHERE id_nominal=?";
try (PreparedStatement p = c.prepareStatement(sql)) {
p.setString(1, kode);
p.setString(2, kondisi);
p.executeUpdate();
}}catch(SQLException e){}
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JTabbedPane Jtab1;
private javax.swing.JComboBox Kodenom;
private javax.swing.JTextField Kodenomi;
private javax.swing.JComboBox Kodepro;
private javax.swing.JTable List_nominal;
private javax.swing.JTable List_produk;
private javax.swing.JTable Stock;
private javax.swing.JRadioButton Tahun;
private javax.swing.JRadioButton bulan;
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JRadioButton hari;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton10;
private javax.swing.JButton jButton11;
private javax.swing.JButton jButton12;
private javax.swing.JButton jButton13;
private javax.swing.JButton jButton14;
private javax.swing.JButton jButton15;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
private javax.swing.JButton jButton6;
private javax.swing.JButton jButton7;
private javax.swing.JButton jButton8;
private javax.swing.JButton jButton9;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
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;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem jMenuItem1;
private javax.swing.JMenuItem jMenuItem2;
private javax.swing.JMenuItem jMenuItem3;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel10;
private javax.swing.JPanel jPanel11;
private javax.swing.JPanel jPanel12;
private javax.swing.JPanel jPanel13;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JPanel jPanel6;
private javax.swing.JPanel jPanel7;
private javax.swing.JPanel jPanel8;
private javax.swing.JPanel jPanel9;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JScrollPane jScrollPane4;
private javax.swing.JScrollPane jScrollPane5;
private javax.swing.JTextField jmltrx;
private javax.swing.JFormattedTextField laba;
private javax.swing.JTextField lblketnom;
private javax.swing.JTextField lblketpro;
public static com.toedter.calendar.JDateChooser pildate;
private javax.swing.JTable tb_harga;
private javax.swing.JTable tbpenjualan;
private javax.swing.JFormattedTextField totpend;
private javax.swing.JTextField txthargabeli;
private javax.swing.JTextField txthargajual;
private javax.swing.JTextField txtkdpro;
private javax.swing.JTextField txtnmpro;
private javax.swing.JTextField txtnomi;
// End of variables declaration//GEN-END:variables
}
No comments:
Post a Comment