コード例 #1
0
  private void QuantityEditButtonActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_QuantityEditButtonActionPerformed
    int warehouseindex = getWarehouseIndex();
    if (warehouseindex == -1) return;

    int selected_row = QuantityTB.getSelectedRow();
    if (selected_row == -1 || QuantityTB.getValueAt(selected_row, 1) == null) return;
    String date = (String) QuantityTB.getValueAt(selected_row, 0);

    EditQuantityDialog editquantity_dialog =
        new EditQuantityDialog(null, true, st, itemindex, warehouseindex, date);
    editquantity_dialog.setVisible(true);
    String added_value = editquantity_dialog.getReturnValue();

    // error in database operation
    if (added_value.equals("-1")) {
      JOptionPane.showMessageDialog(
          null, "Error editing quantity.", "Error Dialog", JOptionPane.ERROR_MESSAGE);
      return;
    }
    // clicking cancel button
    else if (added_value.equals("-2")) {
      return;
    }

    QuantityTB.setValueAt(added_value, selected_row, 1);
  } // GEN-LAST:event_QuantityEditButtonActionPerformed
コード例 #2
0
  private void WarehouseCBActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_WarehouseCBActionPerformed
    int warehouseindex =
        st.getWarehouseIndex(((String) WarehouseCB.getSelectedItem()).toLowerCase());

    QuantityLB.setText(
        "Total Quantity: "
            + st.getTotalQuantityByWarehouseAndCode(
                ((String) WarehouseCB.getSelectedItem()).toLowerCase(), item_code));

    ArrayList<String[]> quantity_expired_list =
        st.setQuantityExpiredDateTable(warehouseindex, itemindex);

    DefaultTableModel quantity_expired_model = (DefaultTableModel) QuantityTB.getModel();

    GuiHelper.ClearAllTable(QuantityTB);
    quantity_row_length = quantity_expired_list.size();
    for (int i = 0; i < quantity_row_length; i++) {
      if (i == quantity_expired_model.getRowCount()) {
        ((DefaultTableModel) quantity_expired_model)
            .addRow(
                new Object[] {
                  null, null, null, null, null, null, null, null, null, null, null, null, null,
                  null, null, null
                });
      }
      String[] single_list = (String[]) quantity_expired_list.get(i);
      quantity_expired_model.setValueAt(single_list[0], i, 0);
      quantity_expired_model.setValueAt(single_list[1], i, 1);
    }
  } // GEN-LAST:event_WarehouseCBActionPerformed
コード例 #3
0
  private void QuantityDeleteButtonActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_QuantityDeleteButtonActionPerformed
    int warehouseindex = getWarehouseIndex();
    if (warehouseindex == -1) return;

    int selected_row = QuantityTB.getSelectedRow();
    if (selected_row == -1 || QuantityTB.getValueAt(selected_row, 1) == null) return;
    String date = (String) QuantityTB.getValueAt(selected_row, 0);

    int answer =
        JOptionPane.showConfirmDialog(
            null,
            "Do you really want to delete it?",
            "Confirmation Dialog",
            JOptionPane.YES_NO_OPTION);

    if (answer == JOptionPane.YES_OPTION) {
      if (st.deleteQuantityAndExpiredDate(itemindex, warehouseindex, date)) {
        WarehouseCBActionPerformed(null);
      }
    }
  } // GEN-LAST:event_QuantityDeleteButtonActionPerformed
コード例 #4
0
  private void QuantityAddButtonActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_QuantityAddButtonActionPerformed

    int warehouseindex = getWarehouseIndex();
    if (warehouseindex == -1) return;

    AddQuantityDialog addquantity_dialog =
        new AddQuantityDialog(null, true, st, itemindex, warehouseindex);
    addquantity_dialog.setVisible(true);
    String[] added_value = addquantity_dialog.getReturnValue();

    if (added_value == null) {
      JOptionPane.showMessageDialog(
          null,
          "Error adding quantity and expired date.",
          "Error Dialog",
          JOptionPane.ERROR_MESSAGE);
      return;
    }
    // clicking cancel button
    else if (added_value.length == 0) {
      return;
    }

    int total_row = QuantityTB.getRowCount();
    if (quantity_row_length == total_row) {
      ((DefaultTableModel) QuantityTB.getModel())
          .addRow(
              new Object[] {
                null, null, null, null, null, null, null, null, null, null, null, null, null, null,
                null, null
              });
    }
    QuantityTB.setValueAt(added_value[0], quantity_row_length, 0);
    QuantityTB.setValueAt(added_value[1], quantity_row_length, 1);
    quantity_row_length++;
  } // GEN-LAST:event_QuantityAddButtonActionPerformed
コード例 #5
0
  /** Creates new form AddSellerDialog */
  public EditItemDialog(java.awt.Frame parent, boolean modal, JTable table, Connection conn) {
    super(parent, modal);
    this.conn = conn;
    initComponents();

    GuiHelper.setOnCenter((Window) this);

    this.table = table;

    row = table.getSelectedRow();

    item_code = (String) table.getModel().getValueAt(row, 0);

    // set data on dialog text field
    itemCodeTF.setText(item_code);
    nameTF.setText((String) table.getModel().getValueAt(row, 2));
    categoryTF.setText((String) table.getModel().getValueAt(row, 1));

    // just use plain number instead the currency format
    NumberFormat nf = NumberFormat.getCurrencyInstance(new Locale("id", "id"));
    try {
      buyingPriceTF.setText((nf.parse((String) table.getModel().getValueAt(row, 3))).toString());
      salePriceTF.setText((nf.parse((String) table.getModel().getValueAt(row, 4))).toString());
    } catch (java.text.ParseException pe) {
      pe.printStackTrace();
    }

    commentTA.setText((String) table.getModel().getValueAt(row, 6));

    // if length field is null, then deselect the detail size of checkbox
    if (((Integer) table.getModel().getValueAt(row, 8)).intValue() == 0) {
      DetailSizeCheckBoxActionPerformed(null);
      VolumeTF.setText(((Integer) table.getModel().getValueAt(row, 11)).toString());
    }
    // if length, width, height field are not null, then deselect the volume checkbox
    else {
      VolumeCheckBoxActionPerformed(null);
      LengthTF.setText(((Integer) table.getModel().getValueAt(row, 8)).toString());
      WidthTF.setText(((Integer) table.getModel().getValueAt(row, 9)).toString());
      HeightTF.setText(((Integer) table.getModel().getValueAt(row, 10)).toString());
      VolumeTF.setText(((Integer) table.getModel().getValueAt(row, 11)).toString());
    }

    PrimaryTF.setText((String) table.getModel().getValueAt(row, 12));
    MeasurementTF.setText(((Integer) table.getModel().getValueAt(row, 13)).toString());
    SecondaryTF.setText((String) table.getModel().getValueAt(row, 14));
    SecondaryThirdMeasurementTF.setText(
        ((Integer) table.getModel().getValueAt(row, 17)).toString());
    ThirdTF.setText((String) table.getModel().getValueAt(row, 18));

    producerdb = new ProducerDB(conn);
    producerdb.initializeComboBoxProducer(ProducerCoB);
    ProducerCoB.setSelectedItem((String) table.getModel().getValueAt(row, 15));

    sellerdb = new SellerDB(conn);
    sellerdb.initializeSellerItem(listModel);
    sellerdb.initializeSuplierForItem(
        itemsellerModel, (String) table.getModel().getValueAt(row, 2));
    sellerdb.harmonizeSellerItem(listModel, itemsellerModel);

    st = new InventoryDB(conn);

    st.initializeComboBox(WarehouseCB, "warehouse");

    getRootPane().setDefaultButton(OK);

    itemindex = st.getItemIndex(item_code);

    // select warehousecombo box programmatically so quantity and expired date is set up
    WarehouseCB.setSelectedIndex(0);

    QuantityTB.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  }
コード例 #6
0
  // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    BottomPanel = new javax.swing.JPanel();
    Cancel = new javax.swing.JButton();
    OK = new javax.swing.JButton();
    DummyTopLabel = new javax.swing.JLabel();
    LeftDummyLabel = new javax.swing.JLabel();
    RightDummyLabel = new javax.swing.JLabel();
    ItemTabbedPane = new javax.swing.JTabbedPane();
    ItemPanel = new javax.swing.JPanel();
    ItemCodeLabel = new javax.swing.JLabel();
    itemCodeTF = new javax.swing.JTextField();
    nameLabel = new javax.swing.JLabel();
    nameTF = new javax.swing.JTextField();
    buyingPriceLabel = new javax.swing.JLabel();
    buyingPriceTF = new javax.swing.JTextField();
    salePriceLabel = new javax.swing.JLabel();
    salePriceTF = new javax.swing.JTextField();
    commentLabel = new javax.swing.JLabel();
    commentTA = new javax.swing.JTextArea();
    Notes1 = new javax.swing.JLabel();
    Notes2 = new javax.swing.JLabel();
    categoryLabel = new javax.swing.JLabel();
    categoryTF = new javax.swing.JTextField();
    AdditionalPropertiesPanel = new javax.swing.JPanel();
    DetailSizeCheckBox = new javax.swing.JCheckBox();
    LengthLabel = new javax.swing.JLabel();
    LengthTF = new javax.swing.JTextField();
    WidthLabel = new javax.swing.JLabel();
    WidthTF = new javax.swing.JTextField();
    HeightLabel = new javax.swing.JLabel();
    HeightTF = new javax.swing.JTextField();
    VolumeCheckBox = new javax.swing.JCheckBox();
    VolumeLabel = new javax.swing.JLabel();
    VolumeTF = new javax.swing.JTextField();
    PrimaryMeasurementLabel = new javax.swing.JLabel();
    PrimaryTF = new javax.swing.JTextField();
    MeasurementLabel = new javax.swing.JLabel();
    MeasurementTF = new javax.swing.JTextField();
    SecondaryMeasurementLabel = new javax.swing.JLabel();
    SecondaryTF = new javax.swing.JTextField();
    Notes3 = new javax.swing.JLabel();
    Notes4 = new javax.swing.JLabel();
    Secondary_Third_Measurement_Label = new javax.swing.JLabel();
    Third_Measurement_Label = new javax.swing.JLabel();
    SecondaryThirdMeasurementTF = new javax.swing.JTextField();
    ThirdTF = new javax.swing.JTextField();
    OtherPanel = new javax.swing.JPanel();
    ProducerLB = new javax.swing.JLabel();
    AvailableSeller = new javax.swing.JScrollPane();
    AvSel = new javax.swing.JList(listModel);
    AddSeller = new javax.swing.JButton();
    RemoveSeller = new javax.swing.JButton();
    ListSeller = new javax.swing.JScrollPane();
    LsSel = new javax.swing.JList(itemsellerModel);
    AvailableSellers = new javax.swing.JLabel();
    ItemSellers = new javax.swing.JLabel();
    ProducerCoB = new javax.swing.JComboBox();
    QuantityPanel = new javax.swing.JPanel();
    QuantityTablePanel = new javax.swing.JPanel();
    QuantityScrollPane = new javax.swing.JScrollPane();
    QuantityTB = new javax.swing.JTable();
    PropertiesPanel = new javax.swing.JPanel();
    WarehouseCB = new javax.swing.JComboBox();
    QuantityLB = new javax.swing.JLabel();
    QuantityButtonPanel = new javax.swing.JPanel();
    QuantityAddButton = new javax.swing.JButton();
    QuantityEditButton = new javax.swing.JButton();
    QuantityDeleteButton = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Edit Item");
    BottomPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT, 10, 10));

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

    BottomPanel.add(Cancel);

    OK.setText("OK");
    OK.setPreferredSize(new java.awt.Dimension(75, 25));
    OK.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            OKActionPerformed(evt);
          }
        });

    BottomPanel.add(OK);

    getContentPane().add(BottomPanel, java.awt.BorderLayout.SOUTH);

    DummyTopLabel.setText("                ");
    getContentPane().add(DummyTopLabel, java.awt.BorderLayout.NORTH);

    LeftDummyLabel.setText("     ");
    getContentPane().add(LeftDummyLabel, java.awt.BorderLayout.WEST);

    RightDummyLabel.setText("     ");
    getContentPane().add(RightDummyLabel, java.awt.BorderLayout.EAST);

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

    ItemPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
    ItemCodeLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    ItemCodeLabel.setText("* Item Code : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(10, 0, 10, 10);
    ItemPanel.add(ItemCodeLabel, gridBagConstraints);

    itemCodeTF.setColumns(12);
    itemCodeTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(10, 0, 10, 0);
    ItemPanel.add(itemCodeTF, gridBagConstraints);

    nameLabel.setText("* Name : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 10);
    ItemPanel.add(nameLabel, gridBagConstraints);

    nameTF.setColumns(12);
    nameTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
    ItemPanel.add(nameTF, gridBagConstraints);

    buyingPriceLabel.setText("* Buying Price : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 20, 10);
    ItemPanel.add(buyingPriceLabel, gridBagConstraints);

    buyingPriceTF.setColumns(12);
    buyingPriceTF.setFont(new java.awt.Font("Dialog", 1, 12));
    buyingPriceTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 20, 0);
    ItemPanel.add(buyingPriceTF, gridBagConstraints);

    salePriceLabel.setText("* Sale Price : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 20, 10);
    ItemPanel.add(salePriceLabel, gridBagConstraints);

    salePriceTF.setColumns(12);
    salePriceTF.setFont(new java.awt.Font("Dialog", 1, 12));
    salePriceTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 20, 0);
    ItemPanel.add(salePriceTF, gridBagConstraints);

    commentLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    commentLabel.setText("Comment : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
    ItemPanel.add(commentLabel, gridBagConstraints);

    commentTA.setColumns(16);
    commentTA.setLineWrap(true);
    commentTA.setRows(6);
    commentTA.setTabSize(4);
    commentTA.setWrapStyleWord(true);
    commentTA.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    ItemPanel.add(commentTA, gridBagConstraints);

    Notes1.setText("Fields marked with an asterisk * are required.");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.gridwidth = 2;
    ItemPanel.add(Notes1, gridBagConstraints);

    Notes2.setText(
        "<html><center>Choose either Detail of Size checkbox <br>\nor Volume checkbox then fill all the text <br>\nfields of that checkbox!</center></html>");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.gridwidth = 2;
    ItemPanel.add(Notes2, gridBagConstraints);

    categoryLabel.setText("* Category : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 10);
    ItemPanel.add(categoryLabel, gridBagConstraints);

    categoryTF.setColumns(12);
    categoryTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
    ItemPanel.add(categoryTF, gridBagConstraints);

    ItemTabbedPane.addTab("Item", ItemPanel);

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

    DetailSizeCheckBox.setText("Detail of Size");
    DetailSizeCheckBox.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            DetailSizeCheckBoxActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    AdditionalPropertiesPanel.add(DetailSizeCheckBox, gridBagConstraints);

    LengthLabel.setText("Length : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 10);
    AdditionalPropertiesPanel.add(LengthLabel, gridBagConstraints);

    LengthTF.setColumns(12);
    LengthTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
    AdditionalPropertiesPanel.add(LengthTF, gridBagConstraints);

    WidthLabel.setText("Width : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 10);
    AdditionalPropertiesPanel.add(WidthLabel, gridBagConstraints);

    WidthTF.setColumns(12);
    WidthTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
    AdditionalPropertiesPanel.add(WidthTF, gridBagConstraints);

    HeightLabel.setText("Height : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 10);
    AdditionalPropertiesPanel.add(HeightLabel, gridBagConstraints);

    HeightTF.setColumns(12);
    HeightTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
    AdditionalPropertiesPanel.add(HeightTF, gridBagConstraints);

    VolumeCheckBox.setText("Volume");
    VolumeCheckBox.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            VolumeCheckBoxActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    AdditionalPropertiesPanel.add(VolumeCheckBox, gridBagConstraints);

    VolumeLabel.setText("Volume : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 10);
    AdditionalPropertiesPanel.add(VolumeLabel, gridBagConstraints);

    VolumeTF.setColumns(12);
    VolumeTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
    AdditionalPropertiesPanel.add(VolumeTF, gridBagConstraints);

    PrimaryMeasurementLabel.setText("* Primary Measurement : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 10);
    AdditionalPropertiesPanel.add(PrimaryMeasurementLabel, gridBagConstraints);

    PrimaryTF.setColumns(12);
    PrimaryTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
    AdditionalPropertiesPanel.add(PrimaryTF, gridBagConstraints);

    MeasurementLabel.setText("* P = S : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 10);
    AdditionalPropertiesPanel.add(MeasurementLabel, gridBagConstraints);

    MeasurementTF.setColumns(12);
    MeasurementTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
    AdditionalPropertiesPanel.add(MeasurementTF, gridBagConstraints);

    SecondaryMeasurementLabel.setText("* Secondary Measurement : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 10);
    AdditionalPropertiesPanel.add(SecondaryMeasurementLabel, gridBagConstraints);

    SecondaryTF.setColumns(12);
    SecondaryTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
    AdditionalPropertiesPanel.add(SecondaryTF, gridBagConstraints);

    Notes3.setText(
        "<html><center>Choose either Detail of Size checkbox <br>\nor Volume checkbox then fill all the text <br>\nfields of that checkbox!</center></html>");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 12;
    gridBagConstraints.gridwidth = 2;
    AdditionalPropertiesPanel.add(Notes3, gridBagConstraints);

    Notes4.setText("Fields marked with an asterisk * are required.");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 11;
    gridBagConstraints.gridwidth = 2;
    AdditionalPropertiesPanel.add(Notes4, gridBagConstraints);

    Secondary_Third_Measurement_Label.setText("S = T : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 10);
    AdditionalPropertiesPanel.add(Secondary_Third_Measurement_Label, gridBagConstraints);

    Third_Measurement_Label.setText("Third Measurement : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 10);
    AdditionalPropertiesPanel.add(Third_Measurement_Label, gridBagConstraints);

    SecondaryThirdMeasurementTF.setColumns(12);
    SecondaryThirdMeasurementTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
    AdditionalPropertiesPanel.add(SecondaryThirdMeasurementTF, gridBagConstraints);

    ThirdTF.setColumns(12);
    ThirdTF.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
    AdditionalPropertiesPanel.add(ThirdTF, gridBagConstraints);

    ItemTabbedPane.addTab("Additional Properties", AdditionalPropertiesPanel);

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

    ProducerLB.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    ProducerLB.setText("Producer : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    OtherPanel.add(ProducerLB, gridBagConstraints);

    AvailableSeller.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    AvailableSeller.setPreferredSize(new java.awt.Dimension(200, 100));
    AvSel.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    AvSel.setVisibleRowCount(-1);
    AvailableSeller.setViewportView(AvSel);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridheight = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.insets = new java.awt.Insets(10, 20, 0, 20);
    OtherPanel.add(AvailableSeller, gridBagConstraints);

    AddSeller.setText(">");
    AddSeller.setName("toRight");
    AddSeller.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            MoveSellerActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
    OtherPanel.add(AddSeller, gridBagConstraints);

    RemoveSeller.setText("<");
    RemoveSeller.setName("toLeft");
    RemoveSeller.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            MoveSellerActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    OtherPanel.add(RemoveSeller, gridBagConstraints);

    ListSeller.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    ListSeller.setPreferredSize(new java.awt.Dimension(200, 100));
    LsSel.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    LsSel.setVisibleRowCount(-1);
    ListSeller.setViewportView(LsSel);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridheight = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.insets = new java.awt.Insets(10, 20, 0, 20);
    OtherPanel.add(ListSeller, gridBagConstraints);

    AvailableSellers.setText("Available Sellers : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
    OtherPanel.add(AvailableSellers, gridBagConstraints);

    ItemSellers.setText("Item Sellers : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
    OtherPanel.add(ItemSellers, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    OtherPanel.add(ProducerCoB, gridBagConstraints);

    ItemTabbedPane.addTab("Producer & Seller", OtherPanel);

    QuantityTablePanel.setLayout(new java.awt.BorderLayout());

    QuantityTB.setModel(
        new javax.swing.table.DefaultTableModel(
            new Object[][] {
              {null, null},
              {null, null},
              {null, null},
              {null, null}
            },
            new String[] {"Date", "Quantity"}) {
          Class[] types = new Class[] {java.lang.String.class, java.lang.Integer.class};
          boolean[] canEdit = new boolean[] {false, false};

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

          public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
          }
        });
    QuantityScrollPane.setViewportView(QuantityTB);

    QuantityTablePanel.add(QuantityScrollPane, java.awt.BorderLayout.CENTER);

    WarehouseCB.setModel(
        new javax.swing.DefaultComboBoxModel(
            new String[] {"Item 1", "Item 2", "Item 3", "Item 4"}));
    WarehouseCB.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            WarehouseCBActionPerformed(evt);
          }
        });

    PropertiesPanel.add(WarehouseCB);

    QuantityLB.setText("jLabel1");
    PropertiesPanel.add(QuantityLB);

    QuantityTablePanel.add(PropertiesPanel, java.awt.BorderLayout.NORTH);

    QuantityAddButton.setText("Add");
    QuantityAddButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            QuantityAddButtonActionPerformed(evt);
          }
        });

    QuantityButtonPanel.add(QuantityAddButton);

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

    QuantityButtonPanel.add(QuantityEditButton);

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

    QuantityButtonPanel.add(QuantityDeleteButton);

    QuantityTablePanel.add(QuantityButtonPanel, java.awt.BorderLayout.SOUTH);

    QuantityPanel.add(QuantityTablePanel);

    ItemTabbedPane.addTab("Quantity", QuantityPanel);

    getContentPane().add(ItemTabbedPane, java.awt.BorderLayout.CENTER);

    pack();
  } // </editor-fold>//GEN-END:initComponents