private void perLPOComboBoxItemStateChanged(
      java.awt.event.ItemEvent evt) { // GEN-FIRST:event_perLPOComboBoxItemStateChanged

    {
      perDNOTEComboBox.setModel(
          com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(
              connectDB,
              ""
                  + " SELECT distinct invoice_no FROM st_stock_cardex where transaction_type='Stock Returns' AND quantity_ordered>0 AND requisition_no ilike 'PCRT%'  "
                  + "  AND ORDER_NO='"
                  + perLPOComboBox.getSelectedItem().toString()
                  + "' "));

      try {
        reportBodyTable.setModel(
            com.afrisoftech.dbadmin.TableModel.createTableVectors(
                connectDB,
                ""
                    + "SELECT order_no as LPO_NO,invoice_no as DNOTE_no,  item,item_code ,units,    price_per_item,  quantity_received,   vat_amount, quantity_ordered   as Amount,  supplier, store, received_by,    date "
                    + "FROM st_stock_cardex where  transaction_type='Stock Returns'  and ORDER_NO='"
                    + perLPOComboBox.getSelectedItem().toString()
                    + "' and requisition_no ilike 'PCRT%' "
                    + " and  date  between '"
                    + com.afrisoftech.lib.SQLDateFormat.getSQLDate(stratDatePicker.getDate())
                    + "' and '"
                    + com.afrisoftech.lib.SQLDateFormat.getSQLDate(endDatePicker.getDate())
                    + "' "
                    + "group by order_no ,invoice_no ,  item,item_code ,units,    price_per_item,  quantity_received,   vat_amount, quantity_ordered ,  supplier, store, received_by,    date\n"
                    + " order by 1,2,3,4,5,6,7  "));
      } catch (Exception ex) {
        System.err.println("the category error is " + ex);
      }
    }
  } // GEN-LAST:event_perLPOComboBoxItemStateChanged
  private void jComboBox1ActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jComboBox1ActionPerformed
    // crset1.setConnectionSource(pConnDB);
    //            crset1.execute("select description from st_stock_item where department =
    // '"+jComboBox1.getSelectedItem().toString()+"' order by description");
    cmbox2 = new javax.swing.JComboBox();
    cmbox3 = new javax.swing.JComboBox();

    cmbox2.setModel(
        com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(
            connectDB,
            "select description from st_stock_item where department = '"
                + jComboBox1.getSelectedItem().toString()
                + "' order by description"));

    javax.swing.table.TableColumn seditor = this.jTable1.getColumn("Item Description");

    seditor.setCellEditor(new javax.swing.DefaultCellEditor(cmbox2));

    cmbox2.addActionListener(
        new java.awt.event.ActionListener() {

          public void actionPerformed(java.awt.event.ActionEvent evt) {

            cmbox2ActionPerformed(evt);
          }
        });
    // Add your handling code here:
  } // GEN-LAST:event_jComboBox1ActionPerformed
  private void perLPOComboBoxItemStateChanged(
      java.awt.event.ItemEvent evt) { // GEN-FIRST:event_perLPOComboBoxItemStateChanged

    {
      try {
        reportBodyTable.setModel(
            com.afrisoftech.dbadmin.TableModel.createTableVectors(
                connectDB,
                ""
                    + "SELECT grn_no as S13,order_no,delivery_note_no,supplier,item,item_code,SUM(quantity_required)as QTY_Required,SUM(quantity_received) as QTY_Supplied, "
                    + "price_per_item,sum(debit) as Amount FROM st_stock_cardex  "
                    + "where    ORDER_NO='"
                    + perLPOComboBox.getSelectedItem().toString()
                    + "'  "
                    + " and  date  between '"
                    + com.afrisoftech.lib.SQLDateFormat.getSQLDate(stratDatePicker.getDate())
                    + "' and '"
                    + com.afrisoftech.lib.SQLDateFormat.getSQLDate(endDatePicker.getDate())
                    + "' "
                    + "GROUP BY grn_no,order_no,delivery_note_no,supplier,item,price_per_item,item_code having sum(debit-quantity_ordered)>0 ORDER BY grn_no,order_no,delivery_note_no,item_code"));

        perDNOTEComboBox.setModel(
            com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(
                connectDB,
                ""
                    + " SELECT distinct grn_no FROM st_stock_cardex where transaction_type='Receiving' and     "
                    + "   order_no='"
                    + perLPOComboBox.getSelectedItem().toString()
                    + "' "));
      } catch (Exception ex) {
        System.err.println("the category error is " + ex);
      }
    }
  } // GEN-LAST:event_perLPOComboBoxItemStateChanged
  // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    jSearchDialog = new javax.swing.JDialog();
    jSearchPanel = new javax.swing.JPanel();
    jTextField111 = new javax.swing.JTextField();
    jSearchScrollPane = new javax.swing.JScrollPane();
    jSearchTable = new com.afrisoftech.dbadmin.JTable();
    jButton9 = new javax.swing.JButton();
    try {
      java.lang.Class.forName("org.postgresql.Driver");
      System.out.println("Found driver");
    } catch (java.lang.ClassNotFoundException cnf) {
      System.out.println("driver not found");
    }
    jButton1 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    jButton4 = new javax.swing.JButton();
    jLabel5 = new javax.swing.JLabel();
    jSeparator1 = new javax.swing.JSeparator();
    jPanel1 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new com.afrisoftech.dbadmin.JTable();
    jPanel2 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    datePicker1 = new com.afrisoftech.lib.DatePicker();
    jTextField1 = new javax.swing.JTextField();
    jLabel3 = new javax.swing.JLabel();
    jComboBox2 = new javax.swing.JComboBox();
    jCheckBox1 = new javax.swing.JCheckBox();
    jCheckBox2 = new javax.swing.JCheckBox();
    jButton512 = new javax.swing.JButton();

    jSearchDialog.getContentPane().setLayout(new java.awt.GridBagLayout());

    jSearchDialog.setModal(true);
    jSearchDialog.setUndecorated(true);
    jSearchPanel.setLayout(new java.awt.GridBagLayout());

    jSearchPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jTextField111.addCaretListener(
        new javax.swing.event.CaretListener() {
          public void caretUpdate(javax.swing.event.CaretEvent evt) {
            jTextField111CaretUpdate(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 10.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 100);
    jSearchPanel.add(jTextField111, gridBagConstraints);

    jSearchTable.setShowHorizontalLines(false);
    /*    try {
        searchRowSet.setCommand("select product,selling_price,gl_code FROM st_stock_prices WHERE department = 'Pharmacy' order by product");
        searchRowSet.setConnectionSource(pConnDB);

        searchRowSet.execute();

        // crset2.setExecuteOnLoad(true);
        jSearchTable.setModel(new org.netbeans.lib.sql.models.TableModel(searchRowSet, new org.netbeans.lib.sql.models.TableModel.Column[] {
            new org.netbeans.lib.sql.models.TableModel.Column("product", "Description", false),
            new org.netbeans.lib.sql.models.TableModel.Column("selling_price", "Amount", false),
            new org.netbeans.lib.sql.models.TableModel.Column("gl_code", "Gl_code", false)

        }));
        // jSearchScrollPane.setViewportView(jSearchTable);

    } catch(java.sql.SQLException sqlex){
        javax.swing.JOptionPane.showMessageDialog(this,sqlex.getMessage(),"Error Message!",javax.swing.JOptionPane.ERROR_MESSAGE);

        System.out.println(sqlex.getMessage());
    }
    */
    jSearchTable.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            jSearchTableMouseClicked(evt);
          }
        });

    jSearchScrollPane.setViewportView(jSearchTable);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 20.0;
    jSearchPanel.add(jSearchScrollPane, gridBagConstraints);

    jButton9.setText("Cancel");
    jButton9.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton9ActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jSearchPanel.add(jButton9, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jSearchDialog.getContentPane().add(jSearchPanel, gridBagConstraints);

    getContentPane().setLayout(new java.awt.GridBagLayout());

    setClosable(true);
    setIconifiable(true);
    setMaximizable(true);
    setResizable(true);
    setTitle("Amend Stock Buying Prices");
    setPreferredSize(new java.awt.Dimension(650, 700));
    setVisible(true);
    jButton1.setMnemonic('O');
    jButton1.setText("Ok");
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(jButton1, gridBagConstraints);

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

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(jButton3, gridBagConstraints);

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

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(jButton4, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    getContentPane().add(jLabel5, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(jSeparator1, gridBagConstraints);

    jPanel1.setLayout(new java.awt.GridBagLayout());

    jPanel1.setBackground(new java.awt.Color(225, 240, 240));
    jPanel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
    jTable1.setModel(
        new javax.swing.table.DefaultTableModel(
            new Object[][] {
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null},
              {null, null, null, null, null, null}
            },
            new String[] {
              "Product", "Product ID", "Units", "Reorder Level", "Buying Price", "Package"
            }) {
          Class[] types =
              new Class[] {
                java.lang.Object.class,
                java.lang.Object.class,
                java.lang.Object.class,
                java.lang.Object.class,
                java.lang.Double.class,
                java.lang.Object.class
              };
          boolean[] canEdit = new boolean[] {true, false, false, true, true, true};

          public Class getColumnClass(int columnIndex) {
            return types[columnIndex];
          }

          public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
          }
        });
    jTable1.setShowHorizontalLines(false);
    /*       cmbox2 = new javax.swing.JComboBox();

    try {

        crset1.setConnectionSource(pConnDB);
        crset1.execute("select description from st_stock_item");

        cmbox2.setModel(new org.netbeans.lib.sql.models.ComboBoxModel(crset1, "description", null, null,null));

        javax.swing.table.TableColumn seditor = this.jTable1.getColumn("Product");

        seditor.setCellEditor(new javax.swing.DefaultCellEditor(cmbox2));

        cmbox2.addActionListener(new java.awt.event.ActionListener() {

            public void actionPerformed(java.awt.event.ActionEvent evt) {

                cmbox2ActionPerformed(evt);
            }
        });
    } catch(java.sql.SQLException sqlExec) {

        javax.swing.JOptionPane.showMessageDialog(this, sqlExec.getMessage());

    }
    */

    javax.swing.table.TableColumn column = null;
    for (int i = 0; i < 4; i++) {
      column = jTable1.getColumnModel().getColumn(i);
      if (i == 0) {

        column.setPreferredWidth(200); // sport column is bigger
      } else {
        if (i == 1) {
          column.setPreferredWidth(200);
        } else {
          if (i == 2) {
            column.setPreferredWidth(100);
          } else column.setPreferredWidth(100);
        }
      }
    }
    jTable1.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            jTable1MouseClicked(evt);
          }
        });

    jScrollPane1.setViewportView(jTable1);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 10.0;
    gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
    jPanel1.add(jScrollPane1, gridBagConstraints);

    jPanel2.setLayout(new java.awt.GridBagLayout());

    jLabel2.setText("Date");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel2.add(jLabel2, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel2.add(datePicker1, gridBagConstraints);

    jTextField1.setMinimumSize(new java.awt.Dimension(0, 0));
    jTextField1.setPreferredSize(new java.awt.Dimension(0, 0));
    jPanel2.add(jTextField1, new java.awt.GridBagConstraints());

    jLabel3.setText("Store Name");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel2.add(jLabel3, gridBagConstraints);

    jComboBox2.setModel(
        com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(
            connectDB, "select  store_name as name from st_main_stores order by name"));
    jComboBox2.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jComboBox2ActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel2.add(jComboBox2, gridBagConstraints);

    jCheckBox1.setText("Click To Enter Category");
    jCheckBox1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCheckBox1ActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel2.add(jCheckBox1, gridBagConstraints);

    jCheckBox2.setText("Drop List ?");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 20);
    jPanel2.add(jCheckBox2, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel1.add(jPanel2, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 10.0;
    gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
    getContentPane().add(jPanel1, gridBagConstraints);

    jButton512.setMnemonic('R');
    jButton512.setText("RemoveRow");
    jButton512.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton512ActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 5;
    getContentPane().add(jButton512, gridBagConstraints);

    setBounds(0, 0, 700, 523);
  } // </editor-fold>//GEN-END:initComponents
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  private void initComponents() { // GEN-BEGIN:initComponents
    java.awt.GridBagConstraints gridBagConstraints;

    jPanel3 = new javax.swing.JPanel();
    jButton2 = new javax.swing.JButton();
    jButton1 = new javax.swing.JButton();
    jPanel4 = new javax.swing.JPanel();
    jLabel4 = new javax.swing.JLabel();
    jComboBox1 = new javax.swing.JComboBox();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    datePicker1 = new com.afrisoftech.lib.DatePicker();
    datePicker2 = new com.afrisoftech.lib.DatePicker();

    getContentPane().setLayout(new java.awt.GridBagLayout());

    setTitle("Reporting data filter dialog");
    setResizable(false);
    addWindowListener(
        new java.awt.event.WindowAdapter() {
          public void windowClosing(java.awt.event.WindowEvent evt) {
            closeDialog(evt);
          }
        });

    jPanel3.setLayout(new java.awt.GridBagLayout());

    jPanel3.setBorder(new javax.swing.border.EtchedBorder());
    jButton2.setMnemonic('n');
    jButton2.setText("Cancel");
    jButton2.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel3.add(jButton2, gridBagConstraints);

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

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel3.add(jButton1, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
    getContentPane().add(jPanel3, gridBagConstraints);

    jPanel4.setLayout(new java.awt.GridBagLayout());

    jPanel4.setBorder(new javax.swing.border.TitledBorder("Select Store here"));
    jLabel4.setText("Category Name");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.weightx = 1.0;
    jPanel4.add(jLabel4, gridBagConstraints);

    jComboBox1.setModel(
        com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(
            connectDB, "select DISTINCT company_name from payroll_comsetup order by company_name"));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 20);
    jPanel4.add(jComboBox1, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
    getContentPane().add(jPanel4, gridBagConstraints);

    jPanel1.setLayout(new java.awt.GridBagLayout());

    jPanel1.setBorder(new javax.swing.border.TitledBorder("Select Dates"));
    jLabel1.setText("Begin Date");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel1.add(jLabel1, gridBagConstraints);

    jLabel2.setText("End Date");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    jPanel1.add(jLabel2, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
    jPanel1.add(datePicker1, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
    jPanel1.add(datePicker2, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(jPanel1, gridBagConstraints);

    pack();
    java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
    setSize(new java.awt.Dimension(380, 209));
    setLocation((screenSize.width - 380) / 2, (screenSize.height - 209) / 2);
  } // GEN-END:initComponents
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    jTabbedPane1 = new javax.swing.JTabbedPane();
    jPanel4 = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    postbtn = new javax.swing.JButton();
    resetbtn = new javax.swing.JButton();
    cancelbtn = new javax.swing.JButton();
    exitbtn = new javax.swing.JButton();
    jLabel5 = new javax.swing.JLabel();
    jPanel2 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new com.afrisoftech.dbadmin.JTable();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jComboBox1 = new javax.swing.JComboBox();
    datePicker1 = new com.afrisoftech.lib.DatePicker();
    jPanel5 = new javax.swing.JPanel();
    jPanel31 = new javax.swing.JPanel();
    postbtn1 = new javax.swing.JButton();
    resetbtn1 = new javax.swing.JButton();
    cancelbtn1 = new javax.swing.JButton();
    exitbtn1 = new javax.swing.JButton();
    jLabel51 = new javax.swing.JLabel();
    jPanel21 = new javax.swing.JPanel();
    jScrollPane11 = new javax.swing.JScrollPane();
    jTable11 = new com.afrisoftech.dbadmin.JTable();
    jPanel11 = new javax.swing.JPanel();
    jLabel11 = new javax.swing.JLabel();
    datePicker2 = new com.afrisoftech.lib.DatePicker();

    setClosable(true);
    setIconifiable(true);
    setMaximizable(true);
    setResizable(true);
    setTitle("Ordering Goods\n ");
    setVisible(true);
    getContentPane().setLayout(new java.awt.GridBagLayout());

    jPanel4.setAutoscrolls(true);
    jPanel4.setLayout(new java.awt.GridBagLayout());

    jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jPanel3.setLayout(new java.awt.GridBagLayout());

    postbtn.setMnemonic('P');
    postbtn.setText("Post");
    postbtn.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            postbtnActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel3.add(postbtn, gridBagConstraints);

    resetbtn.setMnemonic('R');
    resetbtn.setText("RemoveRow");
    resetbtn.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            resetbtnActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel3.add(resetbtn, gridBagConstraints);

    cancelbtn.setMnemonic('l');
    cancelbtn.setText("Clear");
    cancelbtn.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            cancelbtnActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel3.add(cancelbtn, gridBagConstraints);

    exitbtn.setMnemonic('C');
    exitbtn.setText("Close");
    exitbtn.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            exitbtnActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel3.add(exitbtn, gridBagConstraints);

    jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridwidth = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    jPanel3.add(jLabel5, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 3.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 10, 0, 10);
    jPanel4.add(jPanel3, gridBagConstraints);

    jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jPanel2.setLayout(new java.awt.GridBagLayout());

    jScrollPane1.setHorizontalScrollBarPolicy(
        javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    jScrollPane1.setVerticalScrollBarPolicy(
        javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

    jTable1.setModel(
        new javax.swing.table.DefaultTableModel(
            new Object[][] {
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null}
            },
            new String[] {
              "Cost Center", "Item Description", "Units", "Quantity", "Date Required"
            }) {
          Class[] types =
              new Class[] {
                java.lang.Object.class,
                java.lang.Object.class,
                java.lang.Object.class,
                java.lang.Double.class,
                java.lang.Object.class
              };

          public Class getColumnClass(int columnIndex) {
            return types[columnIndex];
          }
        });
    jTable1.setNextFocusableComponent(postbtn1);
    jTable1.setShowHorizontalLines(false);
    jTable1.setSurrendersFocusOnKeystroke(true);

    /*              try {

            crset3.setConnectionSource(pConnDB);
            crset3.execute("select department_name from pb_departments order by department_name");

            cmbox3.setModel(new org.netbeans.lib.sql.models.ComboBoxModel(crset3, "department_name", null, null,null));

            javax.swing.table.TableColumn seditor = this.jTable1.getColumn("Cost Center");

            seditor.setCellEditor(new javax.swing.DefaultCellEditor(cmbox3));

            //  cmbox3.addActionListener(new java.awt.event.ActionListener() {

                //  public void actionPerformed(java.awt.event.ActionEvent evt) {

                    //       cmbox3ActionPerformed(evt);
                    //  }
                //});
    } catch(java.sql.SQLException sqlExec) {

        javax.swing.JOptionPane.showMessageDialog(this, sqlExec.getMessage());

    }
    */

    javax.swing.table.TableColumn column = null;
    for (int i = 0; i < 3; i++) {
      column = jTable1.getColumnModel().getColumn(i);
      if (i == 0) {

        column.setPreferredWidth(300); // sport column is bigger
      } else {
        if (i == 1) {
          column.setPreferredWidth(200);
        } else {
          // if (i == 2) {
          column.setPreferredWidth(200);
          // }  else
          // column.setPreferredWidth(50);

        }
      }
    }
    jScrollPane1.setViewportView(jTable1);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel2.add(jScrollPane1, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 20.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
    jPanel4.add(jPanel2, gridBagConstraints);

    /*        javax.swing.SpinnerDateModel spinerDate = new javax.swing.SpinnerDateModel();
    dateSpinner = new javax.swing.JSpinner(spinerDate);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 30);
    jPanel1.add(dateSpinner, gridBagConstraints);
    */

    jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jPanel1.setLayout(new java.awt.GridBagLayout());

    jLabel1.setText("Requisation Date");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel1.add(jLabel1, gridBagConstraints);

    jLabel2.setText("Department");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel1.add(jLabel2, gridBagConstraints);

    jComboBox1.setModel(
        com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(
            connectDB, "select department_name from pb_departments order by department_name"));
    jComboBox1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jComboBox1ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel1.add(jComboBox1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel1.add(datePicker1, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 8.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 10);
    jPanel4.add(jPanel1, gridBagConstraints);

    jTabbedPane1.addTab("Product In The Catalog", jPanel4);

    jPanel5.setLayout(new java.awt.GridBagLayout());

    jPanel31.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jPanel31.setLayout(new java.awt.GridBagLayout());

    postbtn1.setText("Post");
    postbtn1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            postbtn1ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel31.add(postbtn1, gridBagConstraints);

    resetbtn1.setMnemonic('R');
    resetbtn1.setText("RemoveRow");
    resetbtn1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            resetbtn1ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel31.add(resetbtn1, gridBagConstraints);

    cancelbtn1.setMnemonic('l');
    cancelbtn1.setText("Clear");
    cancelbtn1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            cancelbtn1ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel31.add(cancelbtn1, gridBagConstraints);

    exitbtn1.setMnemonic('c');
    exitbtn1.setText("Close");
    exitbtn1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            exitbtn1ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel31.add(exitbtn1, gridBagConstraints);

    jLabel51.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridwidth = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    jPanel31.add(jLabel51, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 3.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 10, 0, 10);
    jPanel5.add(jPanel31, gridBagConstraints);

    jPanel21.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jPanel21.setLayout(new java.awt.GridBagLayout());

    jScrollPane11.setHorizontalScrollBarPolicy(
        javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    jScrollPane11.setVerticalScrollBarPolicy(
        javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

    jTable11.setModel(
        new javax.swing.table.DefaultTableModel(
            new Object[][] {
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null},
              {null, null, null, null, null}
            },
            new String[] {"Cost Center", "Item Description", "Units", "Quantity", "Date Due"}));
    jTable11.setNextFocusableComponent(postbtn1);
    jTable11.setShowHorizontalLines(false);
    jTable11.setSurrendersFocusOnKeystroke(true);
    cmbox4 = new javax.swing.JComboBox();

    cmbox4.setModel(
        com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(
            connectDB, "select department_name from pb_departments order by department_name"));

    javax.swing.table.TableColumn seditor = this.jTable11.getColumn("Cost Center");

    seditor.setCellEditor(new javax.swing.DefaultCellEditor(cmbox4));

    /*
    javax.swing.SpinnerDateModel spinerDateTable1 = new javax.swing.SpinnerDateModel();

    javax.swing.JSpinner dateSpinnerTable1 = new javax.swing.JSpinner(spinerDateTable1);

    javax.swing.table.TableColumn seditor = this.jTable11.getColumn("Date Due");

    seditor.setCellEditor(new javax.swing.DefaultCellEditor(dateSpinnerTable1));
    */
    // javax.swing.table.TableColumn column = null;
    /*   for (int i = 0; i < 3; i++) {
        column = jTable11.getColumnModel().getColumn(i);
        if (i == 0) {

            column.setPreferredWidth(300); //sport column is bigger
        } else {
            if (i == 1) {
                column.setPreferredWidth(200);
            } else {
                //if (i == 2) {
                    column.setPreferredWidth(200);
                    // }  else
                //column.setPreferredWidth(50);

            }
        }
    }*/
    jScrollPane11.setViewportView(jTable11);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 2, 0, 2);
    jPanel21.add(jScrollPane11, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 20.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
    jPanel5.add(jPanel21, gridBagConstraints);

    /*        javax.swing.SpinnerDateModel spinerDate1 = new javax.swing.SpinnerDateModel();
    dateSpinner1 = new javax.swing.JSpinner(spinerDate1);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 30);
    jPanel11.add(dateSpinner1, gridBagConstraints);
    /*     gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 20);
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel11.add(jTextField1, gridBagConstraints);
    */
    jPanel11.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jPanel11.setLayout(new java.awt.GridBagLayout());

    jLabel11.setText("Requisation Date");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel11.add(jLabel11, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel11.add(datePicker2, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 8.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 10);
    jPanel5.add(jPanel11, gridBagConstraints);

    jTabbedPane1.addTab("Enter New Items", jPanel5);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(jTabbedPane1, gridBagConstraints);

    setBounds(0, 0, 740, 300);
  } // </editor-fold>//GEN-END:initComponents
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    jTabbedPane1 = new javax.swing.JTabbedPane();
    jPanel1 = new javax.swing.JPanel();
    headerPanel = new javax.swing.JPanel();
    endDatePicker = new com.afrisoftech.lib.DatePicker();
    stratDatePicker = new com.afrisoftech.lib.DatePicker();
    beginDateLbl = new javax.swing.JLabel();
    endDateLbl = new javax.swing.JLabel();
    persupplierComboBox = new javax.swing.JComboBox();
    jLabel1 = new javax.swing.JLabel();
    perLPOComboBox = new javax.swing.JComboBox();
    jLabel2 = new javax.swing.JLabel();
    perDNOTEComboBox = new javax.swing.JComboBox();
    buttonPanel = new javax.swing.JPanel();
    closeBtn = new javax.swing.JButton();
    spaceLable = new javax.swing.JLabel();
    reportBodyPanel = new javax.swing.JPanel();
    reportBodyJscrollPane = new javax.swing.JScrollPane();
    reportBodyTable = new com.afrisoftech.dbadmin.JTable();
    jPanel2 = new javax.swing.JPanel();
    itemReftxt = new javax.swing.JTextField();
    jScrollPane1 = new javax.swing.JScrollPane();
    dataTbl = new com.afrisoftech.dbadmin.JTable();
    jButton1 = new javax.swing.JButton();
    statustxt = new javax.swing.JLabel();
    supplierCmbx = new javax.swing.JComboBox();

    setClosable(true);
    setIconifiable(true);
    setMaximizable(true);
    setResizable(true);
    setTitle("Reversed Items Summary");
    try {
      setSelected(true);
    } catch (java.beans.PropertyVetoException e1) {
      e1.printStackTrace();
    }
    setVisible(true);
    getContentPane().setLayout(new java.awt.GridBagLayout());

    jPanel1.setLayout(new java.awt.GridBagLayout());

    headerPanel.setLayout(new java.awt.GridBagLayout());
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    headerPanel.add(endDatePicker, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    headerPanel.add(stratDatePicker, gridBagConstraints);

    beginDateLbl.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    beginDateLbl.setText("PER LPO NO");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    headerPanel.add(beginDateLbl, gridBagConstraints);

    endDateLbl.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    endDateLbl.setText("Date(Period)");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    headerPanel.add(endDateLbl, gridBagConstraints);

    persupplierComboBox.setModel(
        com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(
            connectDB,
            " SELECT distinct supplier FROM st_stock_cardex where transaction_type='Stock Returns' AND quantity_ordered>0 AND requisition_no ilike 'PCRT%'  "));
    persupplierComboBox.addItemListener(
        new java.awt.event.ItemListener() {
          public void itemStateChanged(java.awt.event.ItemEvent evt) {
            persupplierComboBoxItemStateChanged(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
    headerPanel.add(persupplierComboBox, gridBagConstraints);

    jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    jLabel1.setText("PER Supplier");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    headerPanel.add(jLabel1, gridBagConstraints);

    perLPOComboBox.setModel(
        com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(
            connectDB,
            "SELECT distinct order_no FROM st_stock_cardex where transaction_type='Stock Returns' AND quantity_ordered>0 AND requisition_no ilike 'PCRT%'   "));
    perLPOComboBox.addItemListener(
        new java.awt.event.ItemListener() {
          public void itemStateChanged(java.awt.event.ItemEvent evt) {
            perLPOComboBoxItemStateChanged(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
    headerPanel.add(perLPOComboBox, gridBagConstraints);

    jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    jLabel2.setText("PER DELIVERY NOTE NO");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    headerPanel.add(jLabel2, gridBagConstraints);

    perDNOTEComboBox.addItemListener(
        new java.awt.event.ItemListener() {
          public void itemStateChanged(java.awt.event.ItemEvent evt) {
            perDNOTEComboBoxItemStateChanged(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
    headerPanel.add(perDNOTEComboBox, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel1.add(headerPanel, gridBagConstraints);

    buttonPanel.setLayout(new java.awt.GridBagLayout());

    closeBtn.setMnemonic('l');
    closeBtn.setText("Close Reporter");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    buttonPanel.add(closeBtn, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 100.0;
    gridBagConstraints.weighty = 1.0;
    buttonPanel.add(spaceLable, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel1.add(buttonPanel, gridBagConstraints);

    reportBodyPanel.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            javax.swing.BorderFactory.createEtchedBorder()));
    reportBodyPanel.setLayout(new java.awt.GridBagLayout());

    reportBodyTable.setForeground(new java.awt.Color(0, 0, 255));
    reportBodyJscrollPane.setViewportView(reportBodyTable);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    reportBodyPanel.add(reportBodyJscrollPane, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 200.0;
    jPanel1.add(reportBodyPanel, gridBagConstraints);

    jTabbedPane1.addTab("Reversal report", jPanel1);

    jPanel2.setLayout(new java.awt.GridBagLayout());

    itemReftxt.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
    itemReftxt.setForeground(new java.awt.Color(0, 0, 255));
    itemReftxt.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            null,
            "Type Order No. To Search",
            javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
            javax.swing.border.TitledBorder.DEFAULT_POSITION,
            new java.awt.Font("Tahoma", 0, 11),
            new java.awt.Color(0, 0, 255))); // NOI18N
    itemReftxt.addCaretListener(
        new javax.swing.event.CaretListener() {
          public void caretUpdate(javax.swing.event.CaretEvent evt) {
            itemReftxtCaretUpdate(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel2.add(itemReftxt, gridBagConstraints);

    dataTbl.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {{}}, new String[] {}));

    jScrollPane1.setViewportView(dataTbl);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 100.0;
    jPanel2.add(jScrollPane1, gridBagConstraints);

    jButton1.setText("Refresh LPO for re-receiving");
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 2;
    jPanel2.add(jButton1, gridBagConstraints);

    statustxt.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    statustxt.setText("Ready..");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    jPanel2.add(statustxt, gridBagConstraints);

    supplierCmbx.setModel(
        com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(
            connectDB, "SELECT UPPER(supplier_name) FROM st_suppliers ORDER BY 1"));
    supplierCmbx.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            null,
            "Set Supplier Name",
            javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
            javax.swing.border.TitledBorder.DEFAULT_POSITION,
            new java.awt.Font("Tahoma", 0, 11),
            new java.awt.Color(0, 0, 255))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel2.add(supplierCmbx, gridBagConstraints);

    jTabbedPane1.addTab("Refresh the reversed Internal LPO", jPanel2);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(jTabbedPane1, gridBagConstraints);

    setBounds(0, 0, 1192, 306);
  } // </editor-fold>//GEN-END:initComponents
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    reportBodyPanel = new javax.swing.JPanel();
    reportBodyJscrollPane = new javax.swing.JScrollPane();
    reportBodyTable = new com.afrisoftech.dbadmin.JTable();
    buttonPanel = new javax.swing.JPanel();
    closeBtn = new javax.swing.JButton();
    spaceLable = new javax.swing.JLabel();
    headerPanel = new javax.swing.JPanel();
    endDatePicker = new com.afrisoftech.lib.DatePicker();
    stratDatePicker = new com.afrisoftech.lib.DatePicker();
    beginDateLbl = new javax.swing.JLabel();
    endDateLbl = new javax.swing.JLabel();
    persupplierComboBox = new javax.swing.JComboBox();
    jLabel1 = new javax.swing.JLabel();
    perLPOComboBox = new javax.swing.JComboBox();
    jLabel2 = new javax.swing.JLabel();
    perDNOTEComboBox = new javax.swing.JComboBox();
    jButton1 = new javax.swing.JButton();

    setClosable(true);
    setIconifiable(true);
    setMaximizable(true);
    setResizable(true);
    setTitle("S13 Analysis");
    try {
      setSelected(true);
    } catch (java.beans.PropertyVetoException e1) {
      e1.printStackTrace();
    }
    setVisible(true);
    getContentPane().setLayout(new java.awt.GridBagLayout());

    reportBodyPanel.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            javax.swing.BorderFactory.createEtchedBorder()));
    reportBodyPanel.setLayout(new java.awt.GridBagLayout());

    reportBodyTable.setForeground(new java.awt.Color(0, 0, 255));
    reportBodyJscrollPane.setViewportView(reportBodyTable);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    reportBodyPanel.add(reportBodyJscrollPane, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 200.0;
    getContentPane().add(reportBodyPanel, gridBagConstraints);

    buttonPanel.setLayout(new java.awt.GridBagLayout());

    closeBtn.setMnemonic('l');
    closeBtn.setText("Close Reporter");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    buttonPanel.add(closeBtn, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 100.0;
    gridBagConstraints.weighty = 1.0;
    buttonPanel.add(spaceLable, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(buttonPanel, gridBagConstraints);

    headerPanel.setLayout(new java.awt.GridBagLayout());
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    headerPanel.add(endDatePicker, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    headerPanel.add(stratDatePicker, gridBagConstraints);

    beginDateLbl.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    beginDateLbl.setText("PER LPO NO");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    headerPanel.add(beginDateLbl, gridBagConstraints);

    endDateLbl.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    endDateLbl.setText("Date(Period)");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    headerPanel.add(endDateLbl, gridBagConstraints);

    persupplierComboBox.setModel(
        com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(
            connectDB,
            " SELECT distinct supplier FROM st_stock_cardex where transaction_type='Receiving'  "));
    persupplierComboBox.addItemListener(
        new java.awt.event.ItemListener() {
          public void itemStateChanged(java.awt.event.ItemEvent evt) {
            persupplierComboBoxItemStateChanged(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
    headerPanel.add(persupplierComboBox, gridBagConstraints);

    jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    jLabel1.setText("PER Supplier");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    headerPanel.add(jLabel1, gridBagConstraints);

    perLPOComboBox.setModel(
        com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(
            connectDB,
            "SELECT distinct order_no FROM st_stock_cardex where transaction_type='Receiving'   "));
    perLPOComboBox.addItemListener(
        new java.awt.event.ItemListener() {
          public void itemStateChanged(java.awt.event.ItemEvent evt) {
            perLPOComboBoxItemStateChanged(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
    headerPanel.add(perLPOComboBox, gridBagConstraints);

    jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    jLabel2.setText("PER S13 (SERIAL NO)");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    headerPanel.add(jLabel2, gridBagConstraints);

    perDNOTEComboBox.addItemListener(
        new java.awt.event.ItemListener() {
          public void itemStateChanged(java.awt.event.ItemEvent evt) {
            perDNOTEComboBoxItemStateChanged(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
    headerPanel.add(perDNOTEComboBox, gridBagConstraints);

    jButton1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    jButton1.setText("RE-PRINT S13");
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 20);
    headerPanel.add(jButton1, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(headerPanel, gridBagConstraints);

    setBounds(0, 0, 643, 306);
  } // </editor-fold>//GEN-END:initComponents
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    userdialog = new javax.swing.JDialog();
    jSearchPanel4 = new javax.swing.JPanel();
    usersearchTxt = new javax.swing.JTextField();
    jSearchScrollPane4 = new javax.swing.JScrollPane();
    jSearchTable4 = new com.afrisoftech.dbadmin.JTable();
    jButton93 = new javax.swing.JButton();
    buttonGroup1 = new javax.swing.ButtonGroup();
    jLabel7 = new javax.swing.JLabel();
    jTextField6 = new javax.swing.JTextField();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    jPanel11 = new javax.swing.JPanel();
    jScrollPane21 = new javax.swing.JScrollPane();
    jTable11 = new com.afrisoftech.dbadmin.JTable();
    jSeparator1 = new javax.swing.JSeparator();
    try {
      java.lang.Class.forName("org.postgresql.Driver");
    } catch (java.lang.ClassNotFoundException sl) {
      System.out.println(sl.getMessage());
    }

    jButton11 = new javax.swing.JButton();
    jButton31 = new javax.swing.JButton();
    jButton41 = new javax.swing.JButton();
    jButton51 = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jButton32 = new javax.swing.JButton();

    userdialog.setModal(true);
    userdialog.setUndecorated(true);
    userdialog.getContentPane().setLayout(new java.awt.GridBagLayout());

    jSearchPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jSearchPanel4.setLayout(new java.awt.GridBagLayout());

    usersearchTxt.addCaretListener(
        new javax.swing.event.CaretListener() {
          public void caretUpdate(javax.swing.event.CaretEvent evt) {
            usersearchTxtCaretUpdate(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 10.0;
    jSearchPanel4.add(usersearchTxt, gridBagConstraints);

    jSearchTable4.setShowHorizontalLines(false);
    jSearchTable4.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            jSearchTable4MouseClicked(evt);
          }
        });
    jSearchScrollPane4.setViewportView(jSearchTable4);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 20.0;
    jSearchPanel4.add(jSearchScrollPane4, gridBagConstraints);

    jButton93.setText("Dispose");
    jButton93.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton93ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    jSearchPanel4.add(jButton93, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    userdialog.getContentPane().add(jSearchPanel4, gridBagConstraints);

    setClosable(true);
    setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);
    setIconifiable(true);
    setMaximizable(true);
    setResizable(true);
    setTitle("Maintenance Section Allocation");
    setFrameIcon(null);
    try {
      setSelected(true);
    } catch (java.beans.PropertyVetoException e1) {
      e1.printStackTrace();
    }
    setVisible(true);
    getContentPane().setLayout(new java.awt.GridBagLayout());

    jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.gridwidth = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    getContentPane().add(jLabel7, gridBagConstraints);

    jTextField6.setEditable(false);
    jTextField6.setMinimumSize(new java.awt.Dimension(0, 0));
    jTextField6.setPreferredSize(new java.awt.Dimension(0, 0));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    getContentPane().add(jTextField6, gridBagConstraints);

    jPanel11.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            null,
            "",
            javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
            javax.swing.border.TitledBorder.DEFAULT_POSITION,
            null,
            new java.awt.Color(0, 0, 255)));
    jPanel11.setLayout(new java.awt.GridBagLayout());

    jTable11.setModel(
        new javax.swing.table.DefaultTableModel(
            new Object[][] {
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null},
              {null, null}
            },
            new String[] {"User Name", "Maintenance Section"}));
    jTable11.setShowHorizontalLines(false);
    javax.swing.JComboBox sectComboBox = new javax.swing.JComboBox();

    sectComboBox.setModel(
        com.afrisoftech.lib.ComboBoxModel.ComboBoxModel(
            connectDB,
            "SELECT '-' AS section_name UNION SELECT DISTINCT section_name FROM maintenance.sections ORDER BY section_name;"));

    javax.swing.table.TableColumn seditor11 = this.jTable11.getColumn("Maintenance Section");

    seditor11.setCellEditor(new javax.swing.DefaultCellEditor(sectComboBox));
    jTable11.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            jTable11MouseClicked(evt);
          }
        });
    jScrollPane21.setViewportView(jTable11);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 7;
    gridBagConstraints.gridheight = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipady = 10;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 200.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
    jPanel11.add(jScrollPane21, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.gridwidth = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTH;
    gridBagConstraints.weightx = 1.0;
    jPanel11.add(jSeparator1, gridBagConstraints);

    jButton11.setMnemonic('O');
    jButton11.setText("Allocate staff to Maintenance Section");
    jButton11.setToolTipText("Click here enter data");
    jButton11.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton11ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel11.add(jButton11, gridBagConstraints);

    jButton31.setMnemonic('l');
    jButton31.setText("Clear");
    jButton31.setToolTipText("Click here to clear textfields");
    jButton31.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton31ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel11.add(jButton31, gridBagConstraints);

    jButton41.setMnemonic('C');
    jButton41.setText("Close");
    jButton41.setToolTipText("Click here to close window");
    jButton41.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton41ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel11.add(jButton41, gridBagConstraints);

    jButton51.setMnemonic('d');
    jButton51.setText("Remove Allocation");
    jButton51.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton51ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 5;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel11.add(jButton51, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 500.0;
    gridBagConstraints.weighty = 1.0;
    jPanel11.add(jLabel1, gridBagConstraints);

    jButton32.setMnemonic('l');
    jButton32.setText("Edit");
    jButton32.setToolTipText("Click here to clear textfields");
    jButton32.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton32ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel11.add(jButton32, gridBagConstraints);

    jTabbedPane1.addTab("Maintenance Allocation", jPanel11);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(jTabbedPane1, gridBagConstraints);
    jTabbedPane1.getAccessibleContext().setAccessibleName("Pharmacy/Stock Outlets");

    setBounds(0, 0, 870, 390);
  } // </editor-fold>//GEN-END:initComponents