Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package View; import Kelas.Konfigurasi; import Kelas.Profil; import Kontrol.KonfigurasiKontrol; import Kontrol.PengaturanKontrol; import java.awt.Image; import java.awt.Toolkit; import java.io.File; import java.io.IOException; import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.ImageIcon; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import org.apache.commons.io.FileUtils; /** * * @author damaikurnia */ public class FormPengaturan extends javax.swing.JFrame { File file; /** * Creates new form FormAir */ public FormPengaturan() { initComponents(); this.setLocationRelativeTo(null); // setExtendedState(this.getExtendedState() | JFrame.MAXIMIZED_BOTH); dialog_konfigair.setVisible(false); dialog_konfigair.setSize(940, 480); dialog_konfigair.setLocationRelativeTo(null); dialog_konfigair.setTitle("KONFIGURASI AIR"); isiProfil(); sinkronGambar(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { dialog_konfigair = new javax.swing.JDialog(); jPanel5 = new javax.swing.JPanel(); jPanel6 = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); text_abodemen = new javax.swing.JTextField(); text_pertama = new javax.swing.JTextField(); jLabel14 = new javax.swing.JLabel(); label_m3 = new javax.swing.JLabel(); text_dasartarif = new javax.swing.JTextField(); jLabel16 = new javax.swing.JLabel(); jLabel17 = new javax.swing.JLabel(); label_m4 = new javax.swing.JLabel(); jLabel18 = new javax.swing.JLabel(); text_kedua = new javax.swing.JTextField(); label_m5 = new javax.swing.JLabel(); jLabel19 = new javax.swing.JLabel(); text_selanjutnya = new javax.swing.JTextField(); jLabel20 = new javax.swing.JLabel(); jLabel21 = new javax.swing.JLabel(); jLabel22 = new javax.swing.JLabel(); button_simpanKonfig = new javax.swing.JButton(); jPanel7 = new javax.swing.JPanel(); text_tglTerakhir = new javax.swing.JTextField(); jLabel23 = new javax.swing.JLabel(); jLabel15 = new javax.swing.JLabel(); label_cth = new javax.swing.JLabel(); jPanel8 = new javax.swing.JPanel(); jLabel4 = new javax.swing.JLabel(); text_denda = new javax.swing.JTextField(); jPanel9 = new javax.swing.JPanel(); jLabel24 = new javax.swing.JLabel(); text_registrasi = new javax.swing.JTextField(); jPanel4 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); label_namaDesa = new javax.swing.JLabel(); label_alamatNotelp = new javax.swing.JLabel(); label_kop = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); text_noTelp = new javax.swing.JTextField(); text_namadesa = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); text_alamatdesa = new javax.swing.JTextArea(); button_simpan = new javax.swing.JButton(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); text_desa = new javax.swing.JTextField(); text_kecamatan = new javax.swing.JTextField(); text_kabupaten = new javax.swing.JTextField(); text_provinsi = new javax.swing.JTextField(); text_email = new javax.swing.JTextField(); jLabel13 = new javax.swing.JLabel(); label_gambar = new javax.swing.JLabel(); button_upload = new javax.swing.JButton(); label_namaFile = new javax.swing.JLabel(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenu2 = new javax.swing.JMenu(); jMenuItem3 = new javax.swing.JMenuItem(); jMenuItem13 = new javax.swing.JMenuItem(); jMenu3 = new javax.swing.JMenu(); jMenuItem9 = new javax.swing.JMenuItem(); jMenuItem10 = new javax.swing.JMenuItem(); jMenuItem11 = new javax.swing.JMenuItem(); jMenuItem7 = new javax.swing.JMenuItem(); jMenu4 = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); jMenuItem5 = new javax.swing.JMenuItem(); jMenuItem6 = new javax.swing.JMenuItem(); jMenu5 = new javax.swing.JMenu(); jMenuItem4 = new javax.swing.JMenuItem(); jMenuItem12 = new javax.swing.JMenuItem(); jMenu6 = new javax.swing.JMenu(); jMenuItem14 = new javax.swing.JMenuItem(); jMenuItem8 = new javax.swing.JMenuItem(); jMenuItem2 = new javax.swing.JMenuItem(); jPanel5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Tarif Air")); jLabel3.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel3.setText("BIAYA ABODEMEN"); text_abodemen.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { text_abodemenKeyReleased(evt); } }); text_pertama.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { text_pertamaKeyReleased(evt); } }); jLabel14.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel14.setText("DASAR TARIF"); label_m3.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N label_m3.setText("AS"); text_dasartarif.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { text_dasartarifKeyReleased(evt); } }); jLabel16.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel16.setText("m"); jLabel17.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel17.setText("PERTAMA"); label_m4.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N label_m4.setText("AS"); jLabel18.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel18.setText("KEDUA"); text_kedua.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { text_keduaKeyReleased(evt); } }); label_m5.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N label_m5.setText("AS"); jLabel19.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel19.setText("SELANJUTNYA"); text_selanjutnya.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { text_selanjutnyaKeyReleased(evt); } }); jLabel20.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel20.setText("/m"); jLabel21.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel21.setText("/m"); jLabel22.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel22.setText("/m"); 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.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel6Layout.createSequentialGroup().addComponent(label_m3, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)) .addGroup(jPanel6Layout.createSequentialGroup().addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addComponent(label_m5, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel19)) .addGroup(jPanel6Layout.createSequentialGroup() .addComponent(label_m4, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(text_abodemen, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(text_kedua, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(text_selanjutnya, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(text_pertama, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel6Layout.createSequentialGroup() .addComponent(text_dasartarif, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel21).addComponent(jLabel22)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel6Layout.setVerticalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(text_abodemen, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(text_dasartarif, javax.swing.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE) .addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(text_pertama, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(label_m3, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(text_kedua, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(label_m4, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel21)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(text_selanjutnya, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(label_m5, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel22)) .addContainerGap())); button_simpanKonfig.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N button_simpanKonfig.setText("SIMPAN"); button_simpanKonfig.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { button_simpanKonfigActionPerformed(evt); } }); jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("Jatuh Tempo")); text_tglTerakhir.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { text_tglTerakhirKeyReleased(evt); } }); jLabel23.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel23.setText("PD BLN BERIKUT"); jLabel15.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel15.setText("TERAKHIR PEMB. AIR TGL"); label_cth.setForeground(new java.awt.Color(255, 51, 51)); label_cth.setText("*Cth : Rek. Air bln MARET paling lambat tanggal <<tgl>> APRIL"); javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup(jPanel7Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup().addGap(18, 18, 18) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup().addComponent(jLabel15) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(text_tglTerakhir, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel23)) .addComponent(label_cth)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel7Layout.setVerticalGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(text_tglTerakhir, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(27, 27, 27).addComponent(label_cth) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder("Denda")); jLabel4.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel4.setText("BIAYA DENDA"); text_denda.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { text_dendaKeyReleased(evt); } }); 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().addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(text_denda, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel8Layout.setVerticalGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup() .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(text_denda, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 12, Short.MAX_VALUE))); jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder("Registrasi")); jLabel24.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel24.setText("BIAYA REG"); text_registrasi.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { text_registrasiKeyReleased(evt); } }); 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().addComponent(jLabel24) .addGap(35, 35, 35) .addComponent(text_registrasi, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup() .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(text_registrasi, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 13, 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(button_simpanKonfig, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel5Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel9, 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().addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(1, 1, 1) .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(33, 33, 33))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(button_simpanKonfig, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(6, 6, 6))); jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabel2.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("KONFIGURASI TARIF AIR"); 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(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap() .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 59, Short.MAX_VALUE) .addContainerGap())); javax.swing.GroupLayout dialog_konfigairLayout = new javax.swing.GroupLayout( dialog_konfigair.getContentPane()); dialog_konfigair.getContentPane().setLayout(dialog_konfigairLayout); dialog_konfigairLayout.setHorizontalGroup(dialog_konfigairLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); dialog_konfigairLayout.setVerticalGroup(dialog_konfigairLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(dialog_konfigairLayout.createSequentialGroup() .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel2.setBackground(new java.awt.Color(153, 153, 255)); jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N jLabel1.setText("SISTEM INFORMASI PENGELOLAAN AIR BERSIH"); label_namaDesa.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N label_namaDesa.setText("BADAN USAHA MILIK DESA <<NAMA DESA>>"); label_alamatNotelp.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N label_alamatNotelp.setText("<<ALAMAT, NO TELP>>"); label_kop.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addComponent(label_kop, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(label_namaDesa, javax.swing.GroupLayout.PREFERRED_SIZE, 483, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 483, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(label_alamatNotelp, javax.swing.GroupLayout.PREFERRED_SIZE, 767, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(178, Short.MAX_VALUE))); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(1, 1, 1) .addComponent(label_namaDesa, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(label_alamatNotelp).addGap(0, 22, Short.MAX_VALUE)) .addComponent(label_kop, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); jPanel3.setBackground(new java.awt.Color(255, 255, 255)); jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabel5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabel5.setText("NAMA DESA"); jLabel6.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabel6.setText("ALAMAT DESA"); jLabel7.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabel7.setText("NO TELP"); text_alamatdesa.setColumns(20); text_alamatdesa.setRows(5); jScrollPane1.setViewportView(text_alamatdesa); button_simpan.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N button_simpan.setText("SIMPAN PERUBAHAN"); button_simpan.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { button_simpanActionPerformed(evt); } }); jLabel8.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabel8.setText("DESA"); jLabel9.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabel9.setText("KECAMATAN"); jLabel10.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabel10.setText("KABUPATEN"); jLabel11.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabel11.setText("PROVINSI"); jLabel12.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabel12.setText("EMAIL"); jLabel13.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel13.setText("PROFIL DESA"); label_gambar.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); label_gambar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); button_upload.setText("UPLOAD"); button_upload.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { button_uploadActionPerformed(evt); } }); label_namaFile.setText("jLabel2"); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 1060, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel3Layout.createSequentialGroup().addGap(840, 840, 840).addComponent(label_namaFile, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup().addGap(30, 30, 30) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5).addComponent(jLabel6)) .addGap(5, 5, 5) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(text_namadesa, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(40, 40, 40) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel10) .addGroup(jPanel3Layout.createSequentialGroup().addGap(80, 80, 80).addComponent( text_kabupaten, javax.swing.GroupLayout.PREFERRED_SIZE, 292, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup().addComponent(jLabel11) .addGap(15, 15, 15).addComponent(text_provinsi, javax.swing.GroupLayout.PREFERRED_SIZE, 292, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(15, 15, 15).addComponent(text_email, javax.swing.GroupLayout.PREFERRED_SIZE, 292, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(38, 38, 38).addComponent(label_gambar, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup().addGap(30, 30, 30).addComponent(jLabel7) .addGap(42, 42, 42) .addComponent(text_noTelp, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(453, 453, 453).addComponent(button_upload, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup().addGap(30, 30, 30) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel9)) .addGap(17, 17, 17) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(text_desa, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(text_kecamatan, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(90, 90, 90).addComponent(button_simpan, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE))); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addGap(19, 19, 19) .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(3, 3, 3).addComponent(label_namaFile).addGap(5, 5, 5) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(13, 13, 13).addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(text_namadesa, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(8, 8, 8).addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup().addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(text_kabupaten, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(5, 5, 5) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(text_provinsi, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(4, 4, 4) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(text_email, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(label_gambar, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(text_noTelp, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel3Layout .createSequentialGroup().addGap(10, 10, 10).addComponent(button_upload))) .addGap(5, 5, 5) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(8, 8, 8) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(text_desa, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(8, 8, 8) .addComponent(text_kecamatan, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup().addGap(20, 20, 20).addComponent( button_simpan, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(43, Short.MAX_VALUE))); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jMenu1.setBackground(java.awt.Color.black); jMenu1.setText("HOME"); jMenu1.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N jMenu1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jMenu1MouseClicked(evt); } }); jMenuBar1.add(jMenu1); jMenu2.setBackground(java.awt.Color.black); jMenu2.setText("BARANG"); jMenu2.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N jMenuItem3.setBackground(java.awt.Color.white); jMenuItem3.setForeground(java.awt.Color.black); jMenuItem3.setText("Pembelian Barang"); jMenuItem3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem3ActionPerformed(evt); } }); jMenu2.add(jMenuItem3); jMenuItem13.setBackground(java.awt.Color.white); jMenuItem13.setForeground(java.awt.Color.black); jMenuItem13.setText("Pemakaian Barang"); jMenuItem13.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem13ActionPerformed(evt); } }); jMenu2.add(jMenuItem13); jMenuBar1.add(jMenu2); jMenu3.setBackground(java.awt.Color.black); jMenu3.setText("PELANGGAN"); jMenu3.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N jMenuItem9.setBackground(java.awt.Color.white); jMenuItem9.setForeground(java.awt.Color.black); jMenuItem9.setText("Pendaftaran Pelanggan Baru"); jMenuItem9.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem9ActionPerformed(evt); } }); jMenu3.add(jMenuItem9); jMenuItem10.setBackground(java.awt.Color.white); jMenuItem10.setForeground(java.awt.Color.black); jMenuItem10.setText("Pemakaian Air Pelanggan"); jMenuItem10.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem10ActionPerformed(evt); } }); jMenu3.add(jMenuItem10); jMenuItem11.setBackground(java.awt.Color.white); jMenuItem11.setForeground(java.awt.Color.black); jMenuItem11.setText("Pembayaran Rekening Air"); jMenuItem11.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem11ActionPerformed(evt); } }); jMenu3.add(jMenuItem11); jMenuItem7.setBackground(java.awt.Color.white); jMenuItem7.setForeground(java.awt.Color.black); jMenuItem7.setText("Informasi Keluhan Pelanggan"); jMenuItem7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem7ActionPerformed(evt); } }); jMenu3.add(jMenuItem7); jMenuBar1.add(jMenu3); jMenu4.setBackground(java.awt.Color.black); jMenu4.setText("PENGELUARAN"); jMenu4.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N jMenuItem1.setBackground(java.awt.Color.white); jMenuItem1.setForeground(java.awt.Color.black); jMenuItem1.setText("List Pengeluaran"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jMenu4.add(jMenuItem1); jMenuItem5.setBackground(java.awt.Color.white); jMenuItem5.setForeground(java.awt.Color.black); jMenuItem5.setText("Pengeluaran Bulanan"); jMenuItem5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem5ActionPerformed(evt); } }); jMenu4.add(jMenuItem5); jMenuItem6.setBackground(java.awt.Color.white); jMenuItem6.setForeground(java.awt.Color.black); jMenuItem6.setText("Pembayaran Hutang"); jMenuItem6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem6ActionPerformed(evt); } }); jMenu4.add(jMenuItem6); jMenuBar1.add(jMenu4); jMenu5.setBackground(java.awt.Color.black); jMenu5.setText("LAPORAN"); jMenu5.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N jMenuItem4.setBackground(java.awt.Color.white); jMenuItem4.setForeground(java.awt.Color.black); jMenuItem4.setText("Laba - Rugi"); jMenuItem4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem4ActionPerformed(evt); } }); jMenu5.add(jMenuItem4); jMenuItem12.setBackground(java.awt.Color.white); jMenuItem12.setForeground(java.awt.Color.black); jMenuItem12.setText("Neraca"); jMenuItem12.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem12ActionPerformed(evt); } }); jMenu5.add(jMenuItem12); jMenuBar1.add(jMenu5); jMenu6.setBackground(java.awt.Color.black); jMenu6.setText("PENGATURAN"); jMenu6.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N jMenuItem14.setBackground(java.awt.Color.white); jMenuItem14.setForeground(java.awt.Color.black); jMenuItem14.setText("Investasi Awal"); jMenuItem14.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem14ActionPerformed(evt); } }); jMenu6.add(jMenuItem14); jMenuItem8.setBackground(java.awt.Color.white); jMenuItem8.setForeground(java.awt.Color.black); jMenuItem8.setText("Profil Desa"); jMenuItem8.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem8ActionPerformed(evt); } }); jMenu6.add(jMenuItem8); jMenuItem2.setBackground(java.awt.Color.white); jMenuItem2.setForeground(java.awt.Color.black); jMenuItem2.setText("Pengaturan Persentase Laba Bersih"); jMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem2ActionPerformed(evt); } }); jMenu6.add(jMenuItem2); jMenuBar1.add(jMenu6); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); pack(); }// </editor-fold>//GEN-END:initComponents private void button_simpanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button_simpanActionPerformed try { //konfigurasi simpan file dan rename file dlu String path = new File(".").getCanonicalPath(); // System.out.println(file + " " + path); Profil prof = PengaturanKontrol.getKoneksi().tampilProfil(); FileUtils.copyFileToDirectory(file, new File(path + "/Gambar")); //copy file ke folder image File f = new File(path + "/Gambar/" + prof.getLogo()); f.delete(); file = new File(path + "/Gambar/" + label_namaFile.getText());//set lokasi file file.renameTo(new File(path + "/Gambar/logodesa." + label_namaFile.getText().split("\\.")[1]));//rename file dgn nim //baru masukkan ke database prof.setNamadesa(text_namadesa.getText()); prof.setAlamatdesa(text_alamatdesa.getText()); prof.setNotelp(text_noTelp.getText()); prof.setDesa(text_desa.getText()); prof.setKecamatan(text_kecamatan.getText()); prof.setKabupaten(text_kabupaten.getText()); prof.setProvinsi(text_provinsi.getText()); prof.setEmail(text_email.getText()); prof.setLogo("logodesa." + label_namaFile.getText().split("\\.")[1]); PengaturanKontrol.getKoneksi().updateProfil(prof); JOptionPane.showMessageDialog(null, "Profil desa berhasil dirubah!"); isiProfil(); update(); sinkronGambar(); } catch (SQLException ex) { Logger.getLogger(FormPengaturan.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { Logger.getLogger(FormPengaturan.class.getName()).log(Level.SEVERE, null, ex); } }//GEN-LAST:event_button_simpanActionPerformed private void button_uploadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button_uploadActionPerformed JFileChooser jfc = new JFileChooser(); if (jfc.showOpenDialog(label_gambar) == JFileChooser.APPROVE_OPTION) { Toolkit toolkit = Toolkit.getDefaultToolkit(); Image image = toolkit.getImage(jfc.getSelectedFile().getAbsolutePath()); Image imagedResized = image.getScaledInstance(200, 250, Image.SCALE_DEFAULT); ImageIcon imageIcon = new ImageIcon(imagedResized); label_gambar.setIcon(imageIcon); label_namaFile.setText(jfc.getSelectedFile().getName());//nama file nya // System.out.println("jLabelnamaFile : " + label_namaFile.getText()); file = new File(jfc.getSelectedFile().getPath()); // file untuk dikopi // System.out.println("file : " + file.getPath()); } }//GEN-LAST:event_button_uploadActionPerformed private void text_dasartarifKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_text_dasartarifKeyReleased if (!text_abodemen.getText().matches("[0-9]+") || !text_dasartarif.getText().matches("[0-9]+") || !text_pertama.getText().matches("[0-9]+") || !text_kedua.getText().matches("[0-9]+") || !text_selanjutnya.getText().matches("[0-9]+") || !text_tglTerakhir.getText().matches("[0-9]+") || !text_denda.getText().matches("[0-9]+") || !text_registrasi.getText().matches("[0-9]+") || Integer.parseInt(text_tglTerakhir.getText()) > 31) { if (text_dasartarif.getText().equals("")) { text_dasartarif.setText("0"); } else { JOptionPane.showMessageDialog(null, "Data harus dalam bentuk angka!"); } } else { label_m3.setText(text_dasartarif.getText()); label_m4.setText(text_dasartarif.getText()); label_m5.setText(text_dasartarif.getText()); } }//GEN-LAST:event_text_dasartarifKeyReleased private void button_simpanKonfigActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button_simpanKonfigActionPerformed if (cekTextField() == false) { JOptionPane.showMessageDialog(null, "Tidak dapat menyimpan. Ada data yang tidak sesuai dengan ketentuan!"); } else { try { Konfigurasi konfig = new Konfigurasi(); konfig.setAbodemen(Integer.parseInt(text_abodemen.getText())); konfig.setBagimeter(Integer.parseInt(text_dasartarif.getText())); konfig.setPertama(Integer.parseInt(text_pertama.getText())); konfig.setKedua(Integer.parseInt(text_kedua.getText())); konfig.setKetiga(Integer.parseInt(text_selanjutnya.getText())); konfig.setTglTerakhir(Integer.parseInt(text_tglTerakhir.getText())); konfig.setDenda(Integer.parseInt(text_denda.getText())); konfig.setRegistrasi(Integer.parseInt(text_registrasi.getText())); KonfigurasiKontrol.getKoneksi().updateKonfigurasi(konfig); JOptionPane.showMessageDialog(null, "Data berhasil disimpan"); } catch (SQLException ex) { Logger.getLogger(FormPengaturan.class.getName()).log(Level.SEVERE, null, ex); } } }//GEN-LAST:event_button_simpanKonfigActionPerformed private void text_tglTerakhirKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_text_tglTerakhirKeyReleased if (!text_abodemen.getText().matches("[0-9]+") || !text_dasartarif.getText().matches("[0-9]+") || !text_pertama.getText().matches("[0-9]+") || !text_kedua.getText().matches("[0-9]+") || !text_selanjutnya.getText().matches("[0-9]+") || !text_tglTerakhir.getText().matches("[0-9]+") || !text_denda.getText().matches("[0-9]+") || !text_registrasi.getText().matches("[0-9]+") || Integer.parseInt(text_tglTerakhir.getText()) > 31) { if (text_tglTerakhir.getText().equals("")) { text_tglTerakhir.setText("0"); } else { JOptionPane.showMessageDialog(null, "Data harus dalam bentuk angka!"); } } else { label_cth.setText( "*Cth : Rek. Air bln MARET paling lambat tanggal " + text_tglTerakhir.getText() + " APRIL"); } }//GEN-LAST:event_text_tglTerakhirKeyReleased private void text_abodemenKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_text_abodemenKeyReleased if (!text_abodemen.getText().matches("[0-9]+") || !text_dasartarif.getText().matches("[0-9]+") || !text_pertama.getText().matches("[0-9]+") || !text_kedua.getText().matches("[0-9]+") || !text_selanjutnya.getText().matches("[0-9]+") || !text_tglTerakhir.getText().matches("[0-9]+") || !text_denda.getText().matches("[0-9]+") || !text_registrasi.getText().matches("[0-9]+") || Integer.parseInt(text_tglTerakhir.getText()) > 31) { if (text_abodemen.getText().equals("")) { text_abodemen.setText("0"); } else { JOptionPane.showMessageDialog(null, "Data harus dalam bentuk angka!"); } } }//GEN-LAST:event_text_abodemenKeyReleased private void text_pertamaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_text_pertamaKeyReleased if (!text_abodemen.getText().matches("[0-9]+") || !text_dasartarif.getText().matches("[0-9]+") || !text_pertama.getText().matches("[0-9]+") || !text_kedua.getText().matches("[0-9]+") || !text_selanjutnya.getText().matches("[0-9]+") || !text_tglTerakhir.getText().matches("[0-9]+") || !text_denda.getText().matches("[0-9]+") || !text_registrasi.getText().matches("[0-9]+") || Integer.parseInt(text_tglTerakhir.getText()) > 31) { if (text_pertama.getText().equals("")) { text_pertama.setText("0"); } else { JOptionPane.showMessageDialog(null, "Data harus dalam bentuk angka!"); } } }//GEN-LAST:event_text_pertamaKeyReleased private void text_keduaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_text_keduaKeyReleased if (!text_abodemen.getText().matches("[0-9]+") || !text_dasartarif.getText().matches("[0-9]+") || !text_pertama.getText().matches("[0-9]+") || !text_kedua.getText().matches("[0-9]+") || !text_selanjutnya.getText().matches("[0-9]+") || !text_tglTerakhir.getText().matches("[0-9]+") || !text_denda.getText().matches("[0-9]+") || !text_registrasi.getText().matches("[0-9]+") || Integer.parseInt(text_tglTerakhir.getText()) > 31) { if (text_kedua.getText().equals("")) { text_kedua.setText("0"); } else { JOptionPane.showMessageDialog(null, "Data harus dalam bentuk angka!"); } } }//GEN-LAST:event_text_keduaKeyReleased private void text_selanjutnyaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_text_selanjutnyaKeyReleased if (!text_abodemen.getText().matches("[0-9]+") || !text_dasartarif.getText().matches("[0-9]+") || !text_pertama.getText().matches("[0-9]+") || !text_kedua.getText().matches("[0-9]+") || !text_selanjutnya.getText().matches("[0-9]+") || !text_tglTerakhir.getText().matches("[0-9]+") || !text_denda.getText().matches("[0-9]+") || !text_registrasi.getText().matches("[0-9]+") || Integer.parseInt(text_tglTerakhir.getText()) > 31) { if (text_selanjutnya.getText().equals("")) { text_selanjutnya.setText("0"); } else { JOptionPane.showMessageDialog(null, "Data harus dalam bentuk angka!"); } } }//GEN-LAST:event_text_selanjutnyaKeyReleased private void text_dendaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_text_dendaKeyReleased if (!text_abodemen.getText().matches("[0-9]+") || !text_dasartarif.getText().matches("[0-9]+") || !text_pertama.getText().matches("[0-9]+") || !text_kedua.getText().matches("[0-9]+") || !text_selanjutnya.getText().matches("[0-9]+") || !text_tglTerakhir.getText().matches("[0-9]+") || !text_denda.getText().matches("[0-9]+") || !text_registrasi.getText().matches("[0-9]+") || Integer.parseInt(text_tglTerakhir.getText()) > 31) { if (text_denda.getText().equals("")) { text_denda.setText("0"); } else { JOptionPane.showMessageDialog(null, "Data harus dalam bentuk angka!"); } } }//GEN-LAST:event_text_dendaKeyReleased private void text_registrasiKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_text_registrasiKeyReleased if (!text_abodemen.getText().matches("[0-9]+") || !text_dasartarif.getText().matches("[0-9]+") || !text_pertama.getText().matches("[0-9]+") || !text_kedua.getText().matches("[0-9]+") || !text_selanjutnya.getText().matches("[0-9]+") || !text_tglTerakhir.getText().matches("[0-9]+") || !text_denda.getText().matches("[0-9]+") || !text_registrasi.getText().matches("[0-9]+") || Integer.parseInt(text_tglTerakhir.getText()) > 31) { if (text_registrasi.getText().equals("")) { text_registrasi.setText("0"); } else { JOptionPane.showMessageDialog(null, "Data harus dalam bentuk angka!"); } } }//GEN-LAST:event_text_registrasiKeyReleased private void jMenu1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu1MouseClicked FormAir a = new FormAir(); this.setVisible(false); a.setVisible(true); }//GEN-LAST:event_jMenu1MouseClicked private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed FormBarang a = new FormBarang(); this.setVisible(false); a.setVisible(true); }//GEN-LAST:event_jMenuItem3ActionPerformed private void jMenuItem13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem13ActionPerformed FormTransaksiPemakaianBarang a = new FormTransaksiPemakaianBarang(); this.setVisible(false); a.setVisible(true); }//GEN-LAST:event_jMenuItem13ActionPerformed private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem9ActionPerformed FormAnggota a = new FormAnggota(); this.setVisible(false); a.setVisible(true); }//GEN-LAST:event_jMenuItem9ActionPerformed private void jMenuItem10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem10ActionPerformed FormPemakaianAir a = new FormPemakaianAir(); this.setVisible(false); a.setVisible(true); }//GEN-LAST:event_jMenuItem10ActionPerformed private void jMenuItem11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem11ActionPerformed FormTransaksiPenjualan a = new FormTransaksiPenjualan(); this.setVisible(false); a.setVisible(true); }//GEN-LAST:event_jMenuItem11ActionPerformed private void jMenuItem7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem7ActionPerformed FormKeluhan a = new FormKeluhan(); this.setVisible(false); a.setVisible(true); }//GEN-LAST:event_jMenuItem7ActionPerformed private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed FormPengeluaran a = new FormPengeluaran(); this.setVisible(false); a.setVisible(true); }//GEN-LAST:event_jMenuItem1ActionPerformed private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed FormTransaksiPengeluaran a = new FormTransaksiPengeluaran(); this.setVisible(false); a.setVisible(true); }//GEN-LAST:event_jMenuItem5ActionPerformed private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed FormTransaksiPembayaranHutang a = new FormTransaksiPembayaranHutang(); this.setVisible(false); a.setVisible(true); }//GEN-LAST:event_jMenuItem6ActionPerformed private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed FormLabaRugi a = new FormLabaRugi(); a.setVisible(true); }//GEN-LAST:event_jMenuItem4ActionPerformed private void jMenuItem12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem12ActionPerformed FormNeraca a = new FormNeraca(); a.setVisible(true); }//GEN-LAST:event_jMenuItem12ActionPerformed private void jMenuItem14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem14ActionPerformed FormInvesAwal a = new FormInvesAwal(); a.setVisible(true); }//GEN-LAST:event_jMenuItem14ActionPerformed private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem8ActionPerformed FormPengaturan a = new FormPengaturan(); this.setVisible(false); a.setVisible(true); }//GEN-LAST:event_jMenuItem8ActionPerformed private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed FormSHU a = new FormSHU(); this.setVisible(false); a.setVisible(true); }//GEN-LAST:event_jMenuItem2ActionPerformed public void update() { try { Profil prof = PengaturanKontrol.getKoneksi().tampilProfil(); label_namaDesa.setText("BADAN USAHA MILIK DESA " + prof.getNamadesa()); label_alamatNotelp.setText(prof.getAlamatdesa() + " - " + prof.getNotelp()); } catch (SQLException ex) { Logger.getLogger(FormPengaturan.class.getName()).log(Level.SEVERE, null, ex); } } /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(FormPengaturan.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(FormPengaturan.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(FormPengaturan.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(FormPengaturan.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new FormPengaturan().setVisible(true); } }); } public void sinkronGambar() { try { Profil prof = PengaturanKontrol.getKoneksi().tampilProfil(); String path = new File(".").getCanonicalPath() + "/Gambar/" + prof.getLogo(); Toolkit toolkit = Toolkit.getDefaultToolkit(); Image image = toolkit.getImage(path); Image imagedResized = image.getScaledInstance(110, 100, Image.SCALE_DEFAULT); ImageIcon imageIcon = new ImageIcon(imagedResized); label_kop.setIcon(imageIcon); } catch (IOException ex) { Logger.getLogger(FormPengaturan.class.getName()).log(Level.SEVERE, null, ex); } catch (SQLException ex) { Logger.getLogger(FormPengaturan.class.getName()).log(Level.SEVERE, null, ex); } } public void isiProfil() { try { Profil prof = PengaturanKontrol.getKoneksi().tampilProfil(); label_namaDesa.setText("BADAN USAHA MILIK DESA " + prof.getNamadesa()); label_alamatNotelp.setText(prof.getAlamatdesa() + " " + prof.getDesa() + " " + prof.getKecamatan() + " " + prof.getKabupaten() + " " + prof.getProvinsi() + " - " + prof.getNotelp()); text_namadesa.setText(prof.getNamadesa()); text_alamatdesa.setText(prof.getAlamatdesa()); text_noTelp.setText(prof.getNotelp()); text_desa.setText(prof.getDesa()); text_kecamatan.setText(prof.getKecamatan()); text_kabupaten.setText(prof.getKabupaten()); text_provinsi.setText(prof.getProvinsi()); text_email.setText(prof.getEmail()); String path = new File(".").getCanonicalPath(); Toolkit toolkit = Toolkit.getDefaultToolkit(); Image image = toolkit.getImage(path + "/Gambar/" + prof.getLogo()); // Image imagedResized = image.getScaledInstance(200, 250, Image.SCALE_DEFAULT); Image imagedResized = image.getScaledInstance(175, 145, Image.SCALE_DEFAULT); ImageIcon imageIcon = new ImageIcon(imagedResized); label_gambar.setIcon(imageIcon); label_namaFile.setText(prof.getLogo()); label_namaFile.setVisible(false); } catch (IOException ex) { Logger.getLogger(FormPengaturan.class.getName()).log(Level.SEVERE, null, ex); } catch (SQLException ex) { Logger.getLogger(FormPengaturan.class.getName()).log(Level.SEVERE, null, ex); } } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton button_simpan; private javax.swing.JButton button_simpanKonfig; private javax.swing.JButton button_upload; private javax.swing.JDialog dialog_konfigair; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel13; private javax.swing.JLabel jLabel14; private javax.swing.JLabel jLabel15; private javax.swing.JLabel jLabel16; private javax.swing.JLabel jLabel17; private javax.swing.JLabel jLabel18; private javax.swing.JLabel jLabel19; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel20; private javax.swing.JLabel jLabel21; private javax.swing.JLabel jLabel22; private javax.swing.JLabel jLabel23; private javax.swing.JLabel jLabel24; 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.JMenu jMenu3; private javax.swing.JMenu jMenu4; private javax.swing.JMenu jMenu5; private javax.swing.JMenu jMenu6; private javax.swing.JMenuBar jMenuBar1; private javax.swing.JMenuItem jMenuItem1; private javax.swing.JMenuItem jMenuItem10; private javax.swing.JMenuItem jMenuItem11; private javax.swing.JMenuItem jMenuItem12; private javax.swing.JMenuItem jMenuItem13; private javax.swing.JMenuItem jMenuItem14; private javax.swing.JMenuItem jMenuItem2; private javax.swing.JMenuItem jMenuItem3; private javax.swing.JMenuItem jMenuItem4; private javax.swing.JMenuItem jMenuItem5; private javax.swing.JMenuItem jMenuItem6; private javax.swing.JMenuItem jMenuItem7; private javax.swing.JMenuItem jMenuItem8; private javax.swing.JMenuItem jMenuItem9; private javax.swing.JPanel jPanel1; 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.JLabel label_alamatNotelp; private javax.swing.JLabel label_cth; private javax.swing.JLabel label_gambar; private javax.swing.JLabel label_kop; private javax.swing.JLabel label_m3; private javax.swing.JLabel label_m4; private javax.swing.JLabel label_m5; private javax.swing.JLabel label_namaDesa; private javax.swing.JLabel label_namaFile; private javax.swing.JTextField text_abodemen; private javax.swing.JTextArea text_alamatdesa; private javax.swing.JTextField text_dasartarif; private javax.swing.JTextField text_denda; private javax.swing.JTextField text_desa; private javax.swing.JTextField text_email; private javax.swing.JTextField text_kabupaten; private javax.swing.JTextField text_kecamatan; private javax.swing.JTextField text_kedua; private javax.swing.JTextField text_namadesa; private javax.swing.JTextField text_noTelp; private javax.swing.JTextField text_pertama; private javax.swing.JTextField text_provinsi; private javax.swing.JTextField text_registrasi; private javax.swing.JTextField text_selanjutnya; private javax.swing.JTextField text_tglTerakhir; // End of variables declaration//GEN-END:variables private boolean cekTextField() { boolean cek; if (!text_abodemen.getText().matches("[0-9]+") || !text_dasartarif.getText().matches("[0-9]+") || !text_pertama.getText().matches("[0-9]+") || !text_kedua.getText().matches("[0-9]+") || !text_selanjutnya.getText().matches("[0-9]+") || !text_tglTerakhir.getText().matches("[0-9]+") || !text_denda.getText().matches("[0-9]+") || !text_registrasi.getText().matches("[0-9]+") || Integer.parseInt(text_tglTerakhir.getText()) > 31) { cek = false; } else { cek = true; } return cek; } public void isiKonfigurasi() { try { Konfigurasi kon = KonfigurasiKontrol.getKoneksi().selectKonfigurasi(); text_abodemen.setText(Integer.toString(kon.getAbodemen())); text_pertama.setText(Integer.toString(kon.getPertama())); text_kedua.setText(Integer.toString(kon.getKedua())); text_selanjutnya.setText(Integer.toString(kon.getKetiga())); text_dasartarif.setText(Integer.toString(kon.getBagimeter())); label_m3.setText(Integer.toString(kon.getBagimeter())); label_m4.setText(Integer.toString(kon.getBagimeter())); label_m5.setText(Integer.toString(kon.getBagimeter())); text_tglTerakhir.setText(Integer.toString(kon.getTglTerakhir())); label_cth.setText( "*Cth : Rek. Air bln MARET paling lambat tanggal " + text_tglTerakhir.getText() + " APRIL"); text_denda.setText(Integer.toString(kon.getDenda())); text_registrasi.setText(Integer.toString(kon.getRegistrasi())); } catch (SQLException ex) { Logger.getLogger(FormPengaturan.class.getName()).log(Level.SEVERE, null, ex); } } }