Example usage for java.awt GridBagConstraints HORIZONTAL

List of usage examples for java.awt GridBagConstraints HORIZONTAL

Introduction

In this page you can find the example usage for java.awt GridBagConstraints HORIZONTAL.

Prototype

int HORIZONTAL

To view the source code for java.awt GridBagConstraints HORIZONTAL.

Click Source Link

Document

Resize the component horizontally but not vertically.

Usage

From source file:org.eclipse.wb.tests.designer.swing.model.layout.gbl.GridBagConstraintsTest.java

private void check_nameTemplate(String template, String... lines) throws Exception {
    ContainerInfo panel = parseContainer("class Test extends JPanel {", "  public Test() {",
            "    setLayout(new GridBagLayout());", "    {", "      JButton button = new JButton('button');",
            "      add(button, new GridBagConstraints());", "    }", "  }", "}");
    panel.refresh();/* w  w  w. j a  v  a  2 s  .c  om*/
    ComponentInfo button = getJavaInfoByName("button");
    Activator.getDefault().getPreferenceStore().setValue(
            org.eclipse.wb.internal.swing.model.layout.gbl.IPreferenceConstants.P_CONSTRAINTS_NAME_TEMPLATE,
            template);
    GridBagLayoutInfo.getConstraintsFor(button).getPropertyByTitle("fill")
            .setValue(java.awt.GridBagConstraints.HORIZONTAL);
    assertEditor(lines);
}

From source file:com.cch.aj.entryrecorder.frame.MainJFrame.java

/**
 * 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.//from   w  ww  . ja v  a 2s  .  c om
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    jPanel1 = new javax.swing.JPanel();
    cbEntry = new javax.swing.JComboBox();
    btnDone = new javax.swing.JButton();
    btnRefresh = new javax.swing.JButton();
    btnReport = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    jPanel15 = new javax.swing.JPanel();
    jLabel5 = new javax.swing.JLabel();
    txtProductCode = new javax.swing.JLabel();
    txtProductColor = new javax.swing.JLabel();
    txtProductWeight = new javax.swing.JLabel();
    txtProductPierced = new javax.swing.JLabel();
    txtProductDesc = new javax.swing.JLabel();
    txtProductBung = new javax.swing.JLabel();
    jLabel11 = new javax.swing.JLabel();
    jLabel7 = new javax.swing.JLabel();
    jLabel13 = new javax.swing.JLabel();
    jLabel9 = new javax.swing.JLabel();
    jLabel15 = new javax.swing.JLabel();
    jLabel38 = new javax.swing.JLabel();
    txtProductGrade = new javax.swing.JLabel();
    pnlMouldImage = new javax.swing.JPanel();
    labProductImage = new javax.swing.JLabel();
    jPanel3 = new javax.swing.JPanel();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    jPanel5 = new javax.swing.JPanel();
    jPanel16 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    tblWeight = new javax.swing.JTable();
    jPanel14 = new javax.swing.JPanel();
    jLabel21 = new javax.swing.JLabel();
    txtWeightStaff = new javax.swing.JTextField();
    labWeightStaff = new javax.swing.JLabel();
    btnWeight = new javax.swing.JButton();
    txtWeight = new javax.swing.JTextField();
    pnlChartWeight = new javax.swing.JPanel();
    jPanel37 = new javax.swing.JPanel();
    jPanel38 = new javax.swing.JPanel();
    jScrollPane10 = new javax.swing.JScrollPane();
    tblCycle = new javax.swing.JTable();
    jPanel39 = new javax.swing.JPanel();
    jLabel44 = new javax.swing.JLabel();
    labBungStaff1 = new javax.swing.JLabel();
    btnCycle = new javax.swing.JButton();
    txtCycle = new javax.swing.JTextField();
    txtCycleStaff = new javax.swing.JTextField();
    jPanel17 = new javax.swing.JPanel();
    jPanel18 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    tblWall = new javax.swing.JTable();
    jPanel19 = new javax.swing.JPanel();
    jLabel22 = new javax.swing.JLabel();
    txtWallStaff = new javax.swing.JTextField();
    labWallStaff = new javax.swing.JLabel();
    btnWall = new javax.swing.JButton();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    jLabel8 = new javax.swing.JLabel();
    txtWallUnderHandle = new javax.swing.JTextField();
    txtWallBase = new javax.swing.JTextField();
    txtWallClosure = new javax.swing.JTextField();
    txtWallHandleBung = new javax.swing.JTextField();
    txtWallHandleLeft = new javax.swing.JTextField();
    txtWallHandleRight = new javax.swing.JTextField();
    pnlWallImage = new javax.swing.JPanel();
    jLabel37 = new javax.swing.JLabel();
    jPanel6 = new javax.swing.JPanel();
    jPanel20 = new javax.swing.JPanel();
    jScrollPane3 = new javax.swing.JScrollPane();
    tblTap = new javax.swing.JTable();
    jPanel21 = new javax.swing.JPanel();
    jLabel23 = new javax.swing.JLabel();
    labTapStaff = new javax.swing.JLabel();
    btnTap = new javax.swing.JButton();
    cbTap = new javax.swing.JComboBox();
    txtTapStaff = new javax.swing.JTextField();
    pnlTapImage = new javax.swing.JPanel();
    jLabel36 = new javax.swing.JLabel();
    pnlChartTap = new javax.swing.JPanel();
    jPanel7 = new javax.swing.JPanel();
    jPanel31 = new javax.swing.JPanel();
    jScrollPane7 = new javax.swing.JScrollPane();
    tblBung = new javax.swing.JTable();
    jPanel32 = new javax.swing.JPanel();
    jLabel39 = new javax.swing.JLabel();
    labBungStaff = new javax.swing.JLabel();
    btnBung = new javax.swing.JButton();
    cbBung = new javax.swing.JComboBox();
    txtBungStaff = new javax.swing.JTextField();
    jPanel22 = new javax.swing.JPanel();
    jPanel23 = new javax.swing.JPanel();
    jScrollPane4 = new javax.swing.JScrollPane();
    tblBore = new javax.swing.JTable();
    jPanel24 = new javax.swing.JPanel();
    labBoreStaff = new javax.swing.JLabel();
    btnBore = new javax.swing.JButton();
    jLabel10 = new javax.swing.JLabel();
    jLabel12 = new javax.swing.JLabel();
    jLabel14 = new javax.swing.JLabel();
    txtBore1 = new javax.swing.JTextField();
    txtBore2 = new javax.swing.JTextField();
    txtBoreStaff = new javax.swing.JTextField();
    txtNeck = new javax.swing.JTextField();
    pnlBoreImage1 = new javax.swing.JPanel();
    jLabel35 = new javax.swing.JLabel();
    pnlBoreImage2 = new javax.swing.JPanel();
    labBoreImage2 = new javax.swing.JLabel();
    pnlNeckImage = new javax.swing.JPanel();
    labNeckImage = new javax.swing.JLabel();
    jLabel82 = new javax.swing.JLabel();
    txtBore11 = new javax.swing.JTextField();
    txtBore21 = new javax.swing.JTextField();
    jLabel83 = new javax.swing.JLabel();
    jLabel84 = new javax.swing.JLabel();
    txtNeck1 = new javax.swing.JTextField();
    labBoreStaff1 = new javax.swing.JLabel();
    txtBoreStaff1 = new javax.swing.JTextField();
    btnBore1 = new javax.swing.JButton();
    jPanel25 = new javax.swing.JPanel();
    jPanel26 = new javax.swing.JPanel();
    jScrollPane5 = new javax.swing.JScrollPane();
    tblCheck = new javax.swing.JTable();
    jPanel27 = new javax.swing.JPanel();
    jLabel24 = new javax.swing.JLabel();
    labCheckStaff = new javax.swing.JLabel();
    btnCheck = new javax.swing.JButton();
    jLabel16 = new javax.swing.JLabel();
    jLabel17 = new javax.swing.JLabel();
    jLabel18 = new javax.swing.JLabel();
    jLabel19 = new javax.swing.JLabel();
    jLabel20 = new javax.swing.JLabel();
    jLabel25 = new javax.swing.JLabel();
    jLabel26 = new javax.swing.JLabel();
    cbNeckRound = new javax.swing.JComboBox();
    cbNeckComplete = new javax.swing.JComboBox();
    cbUnderTheHandle = new javax.swing.JComboBox();
    cbBungIfDrilled = new javax.swing.JComboBox();
    cbBase = new javax.swing.JComboBox();
    cbStrengthOfDrum = new javax.swing.JComboBox();
    cbWeightWithinRange = new javax.swing.JComboBox();
    cbColourTexture = new javax.swing.JComboBox();
    txtCheckStaff = new javax.swing.JTextField();
    jLabel52 = new javax.swing.JLabel();
    cbBungProvision = new javax.swing.JComboBox();
    jPanel28 = new javax.swing.JPanel();
    jPanel29 = new javax.swing.JPanel();
    jScrollPane6 = new javax.swing.JScrollPane();
    tblDrop = new javax.swing.JTable();
    jPanel30 = new javax.swing.JPanel();
    jLabel27 = new javax.swing.JLabel();
    labDropStaff = new javax.swing.JLabel();
    btnDrop = new javax.swing.JButton();
    jLabel28 = new javax.swing.JLabel();
    jLabel29 = new javax.swing.JLabel();
    jLabel30 = new javax.swing.JLabel();
    jLabel31 = new javax.swing.JLabel();
    jLabel32 = new javax.swing.JLabel();
    jLabel33 = new javax.swing.JLabel();
    jLabel34 = new javax.swing.JLabel();
    cbDrop1 = new javax.swing.JComboBox();
    cbDrop2 = new javax.swing.JComboBox();
    cbDrop3 = new javax.swing.JComboBox();
    cbDrop4 = new javax.swing.JComboBox();
    cbDrop5 = new javax.swing.JComboBox();
    cbDrop6 = new javax.swing.JComboBox();
    cbDrop7 = new javax.swing.JComboBox();
    cbDrop8 = new javax.swing.JComboBox();
    txtDropStaff = new javax.swing.JTextField();
    jPanel13 = new javax.swing.JPanel();
    jLabel49 = new javax.swing.JLabel();
    jLabel76 = new javax.swing.JLabel();
    txtPalletQuantity = new javax.swing.JTextField();
    txtPalletProducedA = new javax.swing.JTextField();
    jLabel77 = new javax.swing.JLabel();
    jLabel78 = new javax.swing.JLabel();
    jLabel79 = new javax.swing.JLabel();
    txtOtherQuantity = new javax.swing.JTextField();
    jLabel80 = new javax.swing.JLabel();
    txtPalletProducedB = new javax.swing.JTextField();
    jLabel81 = new javax.swing.JLabel();
    labQuantityTotal = new javax.swing.JLabel();
    btnQuantity = new javax.swing.JButton();
    jPanel8 = new javax.swing.JPanel();
    jPanel9 = new javax.swing.JPanel();
    jPanel33 = new javax.swing.JPanel();
    jScrollPane8 = new javax.swing.JScrollPane();
    tblRejects = new javax.swing.JTable();
    jPanel34 = new javax.swing.JPanel();
    jLabel40 = new javax.swing.JLabel();
    btnRejects = new javax.swing.JButton();
    txtRejects = new javax.swing.JTextField();
    jPanel10 = new javax.swing.JPanel();
    jLabel42 = new javax.swing.JLabel();
    labRejectsTotal = new javax.swing.JLabel();
    jPanel11 = new javax.swing.JPanel();
    jPanel35 = new javax.swing.JPanel();
    jScrollPane9 = new javax.swing.JScrollPane();
    tblSeconds = new javax.swing.JTable();
    jPanel36 = new javax.swing.JPanel();
    jLabel41 = new javax.swing.JLabel();
    btnSeconds = new javax.swing.JButton();
    txtSeconds = new javax.swing.JTextField();
    jPanel12 = new javax.swing.JPanel();
    jLabel43 = new javax.swing.JLabel();
    labSecondsTotal = new javax.swing.JLabel();
    jPanel40 = new javax.swing.JPanel();
    jPanel41 = new javax.swing.JPanel();
    jScrollPane11 = new javax.swing.JScrollPane();
    tblLeak = new javax.swing.JTable();
    jPanel42 = new javax.swing.JPanel();
    jLabel45 = new javax.swing.JLabel();
    jLabel46 = new javax.swing.JLabel();
    txtLeakFill = new javax.swing.JTextField();
    btnLeakFill = new javax.swing.JButton();
    jLabel47 = new javax.swing.JLabel();
    jLabel48 = new javax.swing.JLabel();
    labLeakTime = new javax.swing.JLabel();
    jLabel50 = new javax.swing.JLabel();
    txtLeakCheck = new javax.swing.JTextField();
    jLabel51 = new javax.swing.JLabel();
    cbLeak = new javax.swing.JComboBox();
    btnLeakCheck = new javax.swing.JButton();
    labLeakNotes = new javax.swing.JLabel();
    jScrollPane12 = new javax.swing.JScrollPane();
    txtLeakNotes = new javax.swing.JTextArea();
    pnlProductTab = new javax.swing.JPanel();
    pnlEditProduct = new javax.swing.JPanel();
    jLabel62 = new javax.swing.JLabel();
    cbProductPolymer = new javax.swing.JComboBox();
    jLabel63 = new javax.swing.JLabel();
    jLabel67 = new javax.swing.JLabel();
    jLabel68 = new javax.swing.JLabel();
    jLabel69 = new javax.swing.JLabel();
    jLabel70 = new javax.swing.JLabel();
    jLabel71 = new javax.swing.JLabel();
    jLabel72 = new javax.swing.JLabel();
    cbProductAdditive1 = new javax.swing.JComboBox();
    txtAdditiveABatchA = new javax.swing.JTextField();
    cbProductAdditive2 = new javax.swing.JComboBox();
    txtAdditiveBBatchA = new javax.swing.JTextField();
    cbProductAdditive3 = new javax.swing.JComboBox();
    txtAdditiveCBatchA = new javax.swing.JTextField();
    jLabel64 = new javax.swing.JLabel();
    jLabel65 = new javax.swing.JLabel();
    jLabel66 = new javax.swing.JLabel();
    jLabel73 = new javax.swing.JLabel();
    jLabel74 = new javax.swing.JLabel();
    jLabel75 = new javax.swing.JLabel();
    txtPolymerBatchA = new javax.swing.JTextField();
    txtPolymerBatchB = new javax.swing.JTextField();
    txtAdditiveABatchB = new javax.swing.JTextField();
    txtAdditiveBBatchB = new javax.swing.JTextField();
    txtAdditiveCBatchB = new javax.swing.JTextField();
    btnMaterialSave = new javax.swing.JButton();
    jScrollPane13 = new javax.swing.JScrollPane();
    tblMaterial = new javax.swing.JTable();
    jPanel43 = new javax.swing.JPanel();
    jLabel53 = new javax.swing.JLabel();
    jLabel54 = new javax.swing.JLabel();
    jLabel55 = new javax.swing.JLabel();
    jLabel56 = new javax.swing.JLabel();
    jLabel57 = new javax.swing.JLabel();
    jLabel58 = new javax.swing.JLabel();
    jLabel59 = new javax.swing.JLabel();
    jLabel60 = new javax.swing.JLabel();
    jLabel61 = new javax.swing.JLabel();
    cbSupervisor1 = new javax.swing.JComboBox();
    cbSupervisor2 = new javax.swing.JComboBox();
    cbSupervisor3 = new javax.swing.JComboBox();
    cbTechnician1 = new javax.swing.JComboBox();
    cbTechnician2 = new javax.swing.JComboBox();
    cbTechnician3 = new javax.swing.JComboBox();
    cbWorker1 = new javax.swing.JComboBox();
    cbWorker2 = new javax.swing.JComboBox();
    cbWorker3 = new javax.swing.JComboBox();
    btnStaffSave = new javax.swing.JButton();
    jPanel4 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    labShift = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setPreferredSize(new java.awt.Dimension(1150, 600));
    getContentPane().setLayout(new java.awt.GridBagLayout());

    jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Machine No"));
    jPanel1.setLayout(new java.awt.GridBagLayout());

    cbEntry.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cbEntryActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    jPanel1.add(cbEntry, gridBagConstraints);

    btnDone.setIcon(new javax.swing.ImageIcon(getClass().getResource("/tickbox_alt.png"))); // NOI18N
    btnDone.setToolTipText("Complete?");
    btnDone.setMaximumSize(new java.awt.Dimension(24, 24));
    btnDone.setMinimumSize(new java.awt.Dimension(24, 24));
    btnDone.setPreferredSize(new java.awt.Dimension(24, 24));
    btnDone.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDoneActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 2);
    jPanel1.add(btnDone, gridBagConstraints);

    btnRefresh.setIcon(new javax.swing.ImageIcon(getClass().getResource("/repeat.png"))); // NOI18N
    btnRefresh.setToolTipText("Refresh");
    btnRefresh.setMaximumSize(new java.awt.Dimension(24, 24));
    btnRefresh.setMinimumSize(new java.awt.Dimension(24, 24));
    btnRefresh.setPreferredSize(new java.awt.Dimension(24, 24));
    btnRefresh.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnRefreshActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 2);
    jPanel1.add(btnRefresh, gridBagConstraints);

    btnReport.setIcon(new javax.swing.ImageIcon(getClass().getResource("/printer.png"))); // NOI18N
    btnReport.setToolTipText("Report");
    btnReport.setMaximumSize(new java.awt.Dimension(24, 24));
    btnReport.setMinimumSize(new java.awt.Dimension(24, 24));
    btnReport.setPreferredSize(new java.awt.Dimension(24, 24));
    btnReport.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnReportActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 2);
    jPanel1.add(btnReport, gridBagConstraints);

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

    jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Product Information"));
    jPanel2.setLayout(new java.awt.GridBagLayout());

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

    jLabel5.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
    jLabel5.setText("CODE:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(jLabel5, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(txtProductCode, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(txtProductColor, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(txtProductWeight, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 13;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(txtProductPierced, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(txtProductDesc, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 11;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(txtProductBung, gridBagConstraints);

    jLabel11.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
    jLabel11.setText("COLOUR");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(jLabel11, gridBagConstraints);

    jLabel7.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
    jLabel7.setText("DESCRIPTION??");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(jLabel7, gridBagConstraints);

    jLabel13.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
    jLabel13.setText("BUNG?");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(jLabel13, gridBagConstraints);

    jLabel9.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
    jLabel9.setText("WEIGHT RANGE??");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(jLabel9, gridBagConstraints);

    jLabel15.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
    jLabel15.setText("PIERCED");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 12;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(jLabel15, gridBagConstraints);

    jLabel38.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
    jLabel38.setText("GRADE");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(jLabel38, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 1, 2, 1);
    jPanel15.add(txtProductGrade, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridheight = 12;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel2.add(jPanel15, gridBagConstraints);

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

    labProductImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/no_photo.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
    pnlMouldImage.add(labProductImage, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    jPanel2.add(pnlMouldImage, gridBagConstraints);

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

    jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Recorder"));
    jPanel3.setLayout(new java.awt.GridBagLayout());

    jTabbedPane1.setPreferredSize(new java.awt.Dimension(1224, 426));

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

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

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

    }, new String[] { "Time", "Value", "Pass", "Staff" }));
    jScrollPane1.setViewportView(tblWeight);

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

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.7;
    jPanel5.add(jPanel16, gridBagConstraints);

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

    jLabel21.setText("Product Weight (grams)??");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.ipady = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(21, 28, 4, 28);
    jPanel14.add(jLabel21, gridBagConstraints);

    txtWeightStaff.setToolTipText("");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.ipady = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(21, 28, 4, 28);
    jPanel14.add(txtWeightStaff, gridBagConstraints);

    labWeightStaff.setText("Check By");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.ipady = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(4, 28, 4, 28);
    jPanel14.add(labWeightStaff, gridBagConstraints);

    btnWeight.setText("Add");
    btnWeight.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnWeightActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.insets = new java.awt.Insets(9, 0, 5, 0);
    jPanel14.add(btnWeight, gridBagConstraints);

    txtWeight.setToolTipText("");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.ipady = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(21, 28, 4, 28);
    jPanel14.add(txtWeight, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.3;
    jPanel5.add(jPanel14, gridBagConstraints);

    pnlChartWeight.setPreferredSize(new java.awt.Dimension(400, 400));
    pnlChartWeight.setLayout(new java.awt.GridBagLayout());
    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 = 1.0;
    jPanel5.add(pnlChartWeight, gridBagConstraints);

    jTabbedPane1.addTab("Weight??", jPanel5);

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

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

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

    }, new String[] { "Time", "Value", "Staff" }));
    jScrollPane10.setViewportView(tblCycle);

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

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.7;
    jPanel37.add(jPanel38, gridBagConstraints);

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

    jLabel44.setText("Cycle Time");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel39.add(jLabel44, gridBagConstraints);

    labBungStaff1.setText("Check By");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel39.add(labBungStaff1, gridBagConstraints);

    btnCycle.setText("Add");
    btnCycle.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCycleActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel39.add(btnCycle, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel39.add(txtCycle, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel39.add(txtCycleStaff, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.3;
    jPanel37.add(jPanel39, gridBagConstraints);

    jTabbedPane1.addTab("Cycle Time", jPanel37);

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

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

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

    }, new String[] { "Time", "Name", "Value", "Pass", "Staff" }));
    jScrollPane2.setViewportView(tblWall);

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

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.7;
    jPanel17.add(jPanel18, gridBagConstraints);

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

    jLabel22.setText("END OF HANDLE SIDE-RIGHT?");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(jLabel22, gridBagConstraints);

    txtWallStaff.setToolTipText("");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(txtWallStaff, gridBagConstraints);

    labWallStaff.setText("Record By");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(labWallStaff, gridBagConstraints);

    btnWall.setText("Add");
    btnWall.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnWallActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(btnWall, gridBagConstraints);

    jLabel2.setText("UNDER THE HANDLE");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(jLabel2, gridBagConstraints);

    jLabel3.setText("BASE (CENTRE)");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(jLabel3, gridBagConstraints);

    jLabel4.setText("CLOSURE SIDE??");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(jLabel4, gridBagConstraints);

    jLabel6.setText("END OF HANDLE SIDE-BUNG??");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(jLabel6, gridBagConstraints);

    jLabel8.setText("END OF HANDLE SIDE-LEFT");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(jLabel8, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(txtWallUnderHandle, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(txtWallBase, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(txtWallClosure, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(txtWallHandleBung, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(txtWallHandleLeft, gridBagConstraints);

    txtWallHandleRight.setToolTipText("");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(9, 33, 9, 33);
    jPanel19.add(txtWallHandleRight, gridBagConstraints);

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

    jLabel37.setIcon(new javax.swing.ImageIcon(getClass().getResource("/no_photo_small.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
    pnlWallImage.add(jLabel37, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.weightx = 1.0;
    jPanel19.add(pnlWallImage, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.3;
    jPanel17.add(jPanel19, gridBagConstraints);

    jTabbedPane1.addTab("Wall Thickness?", jPanel17);

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

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

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

    }, new String[] { "Time", "Value", "Pass", "Staff" }));
    jScrollPane3.setViewportView(tblTap);

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

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.7;
    jPanel6.add(jPanel20, gridBagConstraints);

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

    jLabel23.setText("Tap");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel21.add(jLabel23, gridBagConstraints);

    labTapStaff.setText("Check By");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel21.add(labTapStaff, gridBagConstraints);

    btnTap.setText("Add");
    btnTap.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnTapActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel21.add(btnTap, gridBagConstraints);

    cbTap.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "1:00", "2:00", "3:00",
            "4:00", "5:00", "6:00", "7:00", "8:00", "9;00", "10:00", "11:00", "12:00" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel21.add(cbTap, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel21.add(txtTapStaff, gridBagConstraints);

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

    jLabel36.setIcon(new javax.swing.ImageIcon(getClass().getResource("/no_photo_small.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
    pnlTapImage.add(jLabel36, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.weightx = 1.0;
    jPanel21.add(pnlTapImage, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.3;
    jPanel6.add(jPanel21, gridBagConstraints);

    pnlChartTap.setPreferredSize(new java.awt.Dimension(400, 400));
    pnlChartTap.setLayout(new java.awt.GridBagLayout());
    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 = 1.0;
    jPanel6.add(pnlChartTap, gridBagConstraints);

    jTabbedPane1.addTab("Tap Position?", jPanel6);

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

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

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

    }, new String[] { "Time", "Value", "Pass", "Staff" }));
    jScrollPane7.setViewportView(tblBung);

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

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.7;
    jPanel7.add(jPanel31, gridBagConstraints);

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

    jLabel39.setText("Bung?");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel32.add(jLabel39, gridBagConstraints);

    labBungStaff.setText("Check By");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel32.add(labBungStaff, gridBagConstraints);

    btnBung.setText("Add");
    btnBung.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBungActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel32.add(btnBung, gridBagConstraints);

    cbBung.setModel(
            new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Weak", "Good", "Strong" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel32.add(cbBung, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.insets = new java.awt.Insets(9, 27, 9, 27);
    jPanel32.add(txtBungStaff, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.3;
    jPanel7.add(jPanel32, gridBagConstraints);

    jTabbedPane1.addTab("Bung?", jPanel7);

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

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

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

    }, new String[] { "Time", "Name", "Value", "Pass", "Staff" }));
    jScrollPane4.setViewportView(tblBore);

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

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.7;
    jPanel22.add(jPanel23, gridBagConstraints);

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

    labBoreStaff.setText("Check By");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(0, 15, 0, 0);
    jPanel24.add(labBoreStaff, gridBagConstraints);

    btnBore.setText("Add");
    btnBore.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBoreActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 27, 3, 27);
    jPanel24.add(btnBore, gridBagConstraints);

    jLabel10.setText("1.BORE DIAMETRE 11");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(0, 15, 0, 0);
    jPanel24.add(jLabel10, gridBagConstraints);

    jLabel12.setText("1.BORE DIAMETRE 22");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(0, 15, 0, 0);
    jPanel24.add(jLabel12, gridBagConstraints);

    jLabel14.setText("1.NECK HEIGHT");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(0, 15, 0, 0);
    jPanel24.add(jLabel14, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    jPanel24.add(txtBore1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    jPanel24.add(txtBore2, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    jPanel24.add(txtBoreStaff, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    jPanel24.add(txtNeck, gridBagConstraints);

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

    jLabel35.setIcon(new javax.swing.ImageIcon(getClass().getResource("/b1.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
    pnlBoreImage1.add(jLabel35, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    jPanel24.add(pnlBoreImage1, gridBagConstraints);

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

    labBoreImage2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/b2.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
    pnlBoreImage2.add(labBoreImage2, gridBagConstraints);

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

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

    labNeckImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/b3.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
    pnlNeckImage.add(labNeckImage, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.gridwidth = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    jPanel24.add(pnlNeckImage, gridBagConstraints);

    jLabel82.setText("2.BORE DIAMETRE 11");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(0, 15, 0, 0);
    jPanel24.add(jLabel82, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
    jPanel24.add(txtBore11, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
    jPanel24.add(txtBore21, gridBagConstraints);

    jLabel83.setText("2.BORE DIAMETRE 22");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(0, 15, 0, 0);
    jPanel24.add(jLabel83, gridBagConstraints);

    jLabel84.setText("2.NECK HEIGHT");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(0, 15, 0, 0);
    jPanel24.add(jLabel84, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
    jPanel24.add(txtNeck1, gridBagConstraints);

    labBoreStaff1.setText("Check By");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(0, 15, 0, 0);
    jPanel24.add(labBoreStaff1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
    jPanel24.add(txtBoreStaff1, gridBagConstraints);

    btnBore1.setText("Add");
    btnBore1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBore1ActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 27, 3, 27);
    jPanel24.add(btnBore1, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.3;
    jPanel22.add(jPanel24, gridBagConstraints);

    jTabbedPane1.addTab("Bore / Neck", jPanel22);

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

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

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

    }, new String[] { "Time", "Name", "Value", "Pass", "Staff" }));
    jScrollPane5.setViewportView(tblCheck);

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

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.7;
    jPanel25.add(jPanel26, gridBagConstraints);

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

    jLabel24.setText("STRENGTH OF DRUM");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(jLabel24, gridBagConstraints);

    labCheckStaff.setText("Check By");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(labCheckStaff, gridBagConstraints);

    btnCheck.setText("Add");
    btnCheck.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCheckActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(btnCheck, gridBagConstraints);

    jLabel16.setText("NECK ROUND?");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(jLabel16, gridBagConstraints);

    jLabel17.setText("NECK COMPLETE??");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(jLabel17, gridBagConstraints);

    jLabel18.setText("UNDER THE HANDLE");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(jLabel18, gridBagConstraints);

    jLabel19.setText("BUNG, IF DRILLED?");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(jLabel19, gridBagConstraints);

    jLabel20.setText("BASE");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(jLabel20, gridBagConstraints);

    jLabel25.setText("WEIGHT WITHIN RANGE???");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(jLabel25, gridBagConstraints);

    jLabel26.setText("COLOUR / TEXTURE??");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(jLabel26, gridBagConstraints);

    cbNeckRound.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Checked", "NA" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(cbNeckRound, gridBagConstraints);

    cbNeckComplete
            .setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Checked", "NA" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(cbNeckComplete, gridBagConstraints);

    cbUnderTheHandle
            .setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Checked", "NA" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(cbUnderTheHandle, gridBagConstraints);

    cbBungIfDrilled
            .setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Checked", "NA" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(cbBungIfDrilled, gridBagConstraints);

    cbBase.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Checked", "NA" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(cbBase, gridBagConstraints);

    cbStrengthOfDrum
            .setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Checked", "NA" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(cbStrengthOfDrum, gridBagConstraints);

    cbWeightWithinRange
            .setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Yes", "No" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(cbWeightWithinRange, gridBagConstraints);

    cbColourTexture
            .setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Checked", "NA" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(cbColourTexture, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(txtCheckStaff, gridBagConstraints);

    jLabel52.setText("BUNG PROVISION(BUBBLES/HOLES))?");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(jLabel52, gridBagConstraints);

    cbBungProvision
            .setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Checked", "NA" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel27.add(cbBungProvision, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.3;
    jPanel25.add(jPanel27, gridBagConstraints);

    jTabbedPane1.addTab("Quality Check", jPanel25);

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

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

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

    }, new String[] { "Time", "Name", "Value", "Pass", "Staff" }));
    jScrollPane6.setViewportView(tblDrop);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel29.add(jScrollPane6, 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;
    jPanel28.add(jPanel29, gridBagConstraints);

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

    jLabel27.setIcon(new javax.swing.ImageIcon(getClass().getResource("/p6.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(jLabel27, gridBagConstraints);

    labDropStaff.setText("Test By");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(10, 29, 5, 29);
    jPanel30.add(labDropStaff, gridBagConstraints);

    btnDrop.setText("Add");
    btnDrop.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDropActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.gridwidth = 4;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(btnDrop, gridBagConstraints);

    jLabel28.setIcon(new javax.swing.ImageIcon(getClass().getResource("/p1.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(jLabel28, gridBagConstraints);

    jLabel29.setIcon(new javax.swing.ImageIcon(getClass().getResource("/p2.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(jLabel29, gridBagConstraints);

    jLabel30.setIcon(new javax.swing.ImageIcon(getClass().getResource("/p3.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(jLabel30, gridBagConstraints);

    jLabel31.setIcon(new javax.swing.ImageIcon(getClass().getResource("/p4.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(jLabel31, gridBagConstraints);

    jLabel32.setIcon(new javax.swing.ImageIcon(getClass().getResource("/p5.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(jLabel32, gridBagConstraints);

    jLabel33.setIcon(new javax.swing.ImageIcon(getClass().getResource("/p7.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(jLabel33, gridBagConstraints);

    jLabel34.setIcon(new javax.swing.ImageIcon(getClass().getResource("/p8.png"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(jLabel34, gridBagConstraints);

    cbDrop1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Pass", "Fail" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(cbDrop1, gridBagConstraints);

    cbDrop2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Pass", "Fail" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(cbDrop2, gridBagConstraints);

    cbDrop3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Pass", "Fail" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(cbDrop3, gridBagConstraints);

    cbDrop4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Pass", "Fail" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(cbDrop4, gridBagConstraints);

    cbDrop5.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Pass", "Fail" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(cbDrop5, gridBagConstraints);

    cbDrop6.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Pass", "Fail" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(cbDrop6, gridBagConstraints);

    cbDrop7.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Pass", "Fail" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(cbDrop7, gridBagConstraints);

    cbDrop8.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "Pass", "Fail" }));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(3, 29, 3, 29);
    jPanel30.add(cbDrop8, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.ipady = 4;
    gridBagConstraints.insets = new java.awt.Insets(10, 29, 5, 29);
    jPanel30.add(txtDropStaff, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    jPanel28.add(jPanel30, gridBagConstraints);

    jTabbedPane1.addTab("Drop Test", jPanel28);

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

    jLabel49.setText("Pallet Quantity");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 9;
    gridBagConstraints.ipady = 9;
    gridBagConstraints.weightx = 0.3;
    gridBagConstraints.insets = new java.awt.Insets(7, 22, 7, 22);
    jPanel13.add(jLabel49, gridBagConstraints);

    jLabel76.setText("Pallets Produced");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 9;
    gridBagConstraints.ipady = 9;
    gridBagConstraints.weightx = 0.3;
    gridBagConstraints.insets = new java.awt.Insets(7, 22, 7, 22);
    jPanel13.add(jLabel76, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 9;
    gridBagConstraints.ipady = 9;
    gridBagConstraints.weightx = 0.3;
    gridBagConstraints.insets = new java.awt.Insets(7, 22, 7, 22);
    jPanel13.add(txtPalletQuantity, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 9;
    gridBagConstraints.ipady = 9;
    gridBagConstraints.weightx = 0.3;
    gridBagConstraints.insets = new java.awt.Insets(7, 22, 7, 22);
    jPanel13.add(txtPalletProducedA, gridBagConstraints);

    jLabel77.setText("X");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.ipadx = 9;
    gridBagConstraints.ipady = 9;
    gridBagConstraints.weightx = 0.3;
    gridBagConstraints.insets = new java.awt.Insets(7, 22, 7, 22);
    jPanel13.add(jLabel77, gridBagConstraints);

    jLabel78.setText("Other Quantity");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 9;
    gridBagConstraints.ipady = 9;
    gridBagConstraints.weightx = 0.3;
    gridBagConstraints.insets = new java.awt.Insets(7, 22, 7, 22);
    jPanel13.add(jLabel78, gridBagConstraints);

    jLabel79.setText("Pallets Produced");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 9;
    gridBagConstraints.ipady = 9;
    gridBagConstraints.weightx = 0.3;
    gridBagConstraints.insets = new java.awt.Insets(7, 22, 7, 22);
    jPanel13.add(jLabel79, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 9;
    gridBagConstraints.ipady = 9;
    gridBagConstraints.weightx = 0.3;
    gridBagConstraints.insets = new java.awt.Insets(7, 22, 7, 22);
    jPanel13.add(txtOtherQuantity, gridBagConstraints);

    jLabel80.setText("X");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.ipadx = 9;
    gridBagConstraints.ipady = 9;
    gridBagConstraints.weightx = 0.3;
    gridBagConstraints.insets = new java.awt.Insets(7, 22, 7, 22);
    jPanel13.add(jLabel80, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 9;
    gridBagConstraints.ipady = 9;
    gridBagConstraints.weightx = 0.3;
    gridBagConstraints.insets = new java.awt.Insets(7, 22, 7, 22);
    jPanel13.add(txtPalletProducedB, gridBagConstraints);

    jLabel81.setText("Total Produced");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 9;
    gridBagConstraints.ipady = 9;
    gridBagConstraints.weightx = 0.3;
    gridBagConstraints.insets = new java.awt.Insets(7, 22, 7, 22);
    jPanel13.add(jLabel81, gridBagConstraints);

    labQuantityTotal.setText("total");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.ipadx = 9;
    gridBagConstraints.ipady = 9;
    gridBagConstraints.weightx = 0.3;
    gridBagConstraints.insets = new java.awt.Insets(7, 22, 7, 22);
    jPanel13.add(labQuantityTotal, gridBagConstraints);

    btnQuantity.setText("Save");
    btnQuantity.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnQuantityActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.ipadx = 9;
    gridBagConstraints.ipady = 9;
    gridBagConstraints.insets = new java.awt.Insets(7, 22, 7, 22);
    jPanel13.add(btnQuantity, gridBagConstraints);

    jTabbedPane1.addTab("Quantity Produced?", jPanel13);

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

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

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

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

    }, new String[] { "Time", "Value" }));
    jScrollPane8.setViewportView(tblRejects);

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

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.7;
    jPanel9.add(jPanel33, gridBagConstraints);

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

    jLabel40.setText("Rejects?");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.ipady = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(21, 28, 4, 28);
    jPanel34.add(jLabel40, gridBagConstraints);

    btnRejects.setText("Add");
    btnRejects.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnRejectsActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipadx = 2;
    gridBagConstraints.ipady = 2;
    gridBagConstraints.insets = new java.awt.Insets(11, 11, 11, 11);
    jPanel34.add(btnRejects, gridBagConstraints);

    txtRejects.setToolTipText("");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.ipady = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(21, 28, 4, 28);
    jPanel34.add(txtRejects, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.3;
    jPanel9.add(jPanel34, gridBagConstraints);

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

    jLabel42.setText("Rejects Total : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);
    jPanel10.add(jLabel42, gridBagConstraints);

    labRejectsTotal.setText("NA");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    jPanel10.add(labRejectsTotal, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    jPanel9.add(jPanel10, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.gridheight = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 0.5;
    jPanel8.add(jPanel9, gridBagConstraints);

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

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

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

    }, new String[] { "Time", "Value" }));
    jScrollPane9.setViewportView(tblSeconds);

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

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.7;
    jPanel11.add(jPanel35, gridBagConstraints);

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

    jLabel41.setText("Seconds");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.ipady = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(21, 28, 4, 28);
    jPanel36.add(jLabel41, gridBagConstraints);

    btnSeconds.setText("Add");
    btnSeconds.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSecondsActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipadx = 2;
    gridBagConstraints.ipady = 2;
    gridBagConstraints.insets = new java.awt.Insets(11, 11, 11, 11);
    jPanel36.add(btnSeconds, gridBagConstraints);

    txtSeconds.setToolTipText("");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.ipady = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(21, 28, 4, 28);
    jPanel36.add(txtSeconds, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.3;
    jPanel11.add(jPanel36, gridBagConstraints);

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

    jLabel43.setText("Seconds Total : ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);
    jPanel12.add(jLabel43, gridBagConstraints);

    labSecondsTotal.setText("NA");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    jPanel12.add(labSecondsTotal, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    jPanel11.add(jPanel12, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.gridheight = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 0.5;
    jPanel8.add(jPanel11, gridBagConstraints);

    jTabbedPane1.addTab("Seconds / Rejects?", jPanel8);

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

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

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

    }, new String[] { "Time", "Name", "Value" }));
    jScrollPane11.setViewportView(tblLeak);

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

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(26, 3, 26, 3);
    jPanel40.add(jPanel41, gridBagConstraints);

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

    jLabel45.setText("Stage 1 Testing");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 13, 3, 13);
    jPanel42.add(jLabel45, gridBagConstraints);

    jLabel46.setText("Water filled by");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 13, 3, 13);
    jPanel42.add(jLabel46, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 13, 3, 13);
    jPanel42.add(txtLeakFill, gridBagConstraints);

    btnLeakFill.setText("Add");
    btnLeakFill.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnLeakFillActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 13, 3, 13);
    jPanel42.add(btnLeakFill, gridBagConstraints);

    jLabel47.setText("Stage 2 Examination");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(9, 13, 3, 13);
    jPanel42.add(jLabel47, gridBagConstraints);

    jLabel48.setText("Time filled");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 13, 3, 13);
    jPanel42.add(jLabel48, gridBagConstraints);

    labLeakTime.setText("time");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 13, 3, 13);
    jPanel42.add(labLeakTime, gridBagConstraints);

    jLabel50.setText("Checked By");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 13, 3, 13);
    jPanel42.add(jLabel50, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 13, 3, 13);
    jPanel42.add(txtLeakCheck, gridBagConstraints);

    jLabel51.setText("Any Leaks?");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 13, 3, 13);
    jPanel42.add(jLabel51, gridBagConstraints);

    cbLeak.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Select -", "YES", "NO" }));
    cbLeak.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cbLeakActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 13, 3, 13);
    jPanel42.add(cbLeak, gridBagConstraints);

    btnLeakCheck.setText("Add");
    btnLeakCheck.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnLeakCheckActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 13, 3, 13);
    jPanel42.add(btnLeakCheck, gridBagConstraints);

    labLeakNotes.setText("Notes");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 13, 3, 13);
    jPanel42.add(labLeakNotes, gridBagConstraints);

    txtLeakNotes.setColumns(20);
    txtLeakNotes.setRows(5);
    txtLeakNotes.setMinimumSize(new java.awt.Dimension(150, 100));
    txtLeakNotes.setPreferredSize(new java.awt.Dimension(160, 100));
    jScrollPane12.setViewportView(txtLeakNotes);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipadx = 3;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 13, 3, 13);
    jPanel42.add(jScrollPane12, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(26, 3, 26, 3);
    jPanel40.add(jPanel42, gridBagConstraints);

    jTabbedPane1.addTab("Leak Test?", jPanel40);

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

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

    jLabel62.setText("POLYMER");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 33, 2, 29);
    pnlEditProduct.add(jLabel62, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(cbProductPolymer, gridBagConstraints);

    jLabel63.setText("ADDITIVE(?,UV,)");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 33, 2, 29);
    pnlEditProduct.add(jLabel63, gridBagConstraints);

    jLabel67.setText("TYPE 11");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 33, 2, 29);
    pnlEditProduct.add(jLabel67, gridBagConstraints);

    jLabel68.setText("Batch Number 1?1");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 33, 2, 29);
    pnlEditProduct.add(jLabel68, gridBagConstraints);

    jLabel69.setText("TYPE 2");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 33, 2, 29);
    pnlEditProduct.add(jLabel69, gridBagConstraints);

    jLabel70.setText("Batch Number 1?1");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 33, 2, 29);
    pnlEditProduct.add(jLabel70, gridBagConstraints);

    jLabel71.setText("TYPE 3");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 33, 2, 29);
    pnlEditProduct.add(jLabel71, gridBagConstraints);

    jLabel72.setText("Batch Number 1?1");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 33, 2, 29);
    pnlEditProduct.add(jLabel72, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(cbProductAdditive1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(txtAdditiveABatchA, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(cbProductAdditive2, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(txtAdditiveBBatchA, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(cbProductAdditive3, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(txtAdditiveCBatchA, gridBagConstraints);

    jLabel64.setText("Batch Number 2?2");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(jLabel64, gridBagConstraints);

    jLabel65.setText("Polymer Type");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(jLabel65, gridBagConstraints);

    jLabel66.setText("Batch Number 1?1");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(jLabel66, gridBagConstraints);

    jLabel73.setText("Batch Number 2?2");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(jLabel73, gridBagConstraints);

    jLabel74.setText("Batch Number 2?2");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(jLabel74, gridBagConstraints);

    jLabel75.setText("Batch Number 2?2");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(jLabel75, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(txtPolymerBatchA, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(txtPolymerBatchB, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(txtAdditiveABatchB, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(txtAdditiveBBatchB, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 6;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.weightx = 0.25;
    gridBagConstraints.insets = new java.awt.Insets(2, 29, 2, 29);
    pnlEditProduct.add(txtAdditiveCBatchB, gridBagConstraints);

    btnMaterialSave.setText("Save");
    btnMaterialSave.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnMaterialSaveActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.gridwidth = 4;
    gridBagConstraints.insets = new java.awt.Insets(13, 13, 13, 13);
    pnlEditProduct.add(btnMaterialSave, gridBagConstraints);

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

    }, new String[] { "Time", "Type", "Batch Number" }));
    jScrollPane13.setViewportView(tblMaterial);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.gridheight = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.weighty = 1.0;
    pnlEditProduct.add(jScrollPane13, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    pnlProductTab.add(pnlEditProduct, gridBagConstraints);

    jTabbedPane1.addTab("Raw Material", pnlProductTab);

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

    jLabel53.setText("SUPERVISOR 1");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(jLabel53, gridBagConstraints);

    jLabel54.setText("SUPERVISOR 2");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(jLabel54, gridBagConstraints);

    jLabel55.setText("SUPERVISOR 3");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(jLabel55, gridBagConstraints);

    jLabel56.setText("TECHNICIAN 1");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(jLabel56, gridBagConstraints);

    jLabel57.setText("TECHNICIAN 2");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(jLabel57, gridBagConstraints);

    jLabel58.setText("TECHNICIAN 3");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(jLabel58, gridBagConstraints);

    jLabel59.setText("MACHINE OPERATOR 1?");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(jLabel59, gridBagConstraints);

    jLabel60.setText("MACHINE OPERATOR 2?");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(jLabel60, gridBagConstraints);

    jLabel61.setText("MACHINE OPERATOR 3?");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(jLabel61, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(cbSupervisor1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(cbSupervisor2, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(cbSupervisor3, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(cbTechnician1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(cbTechnician2, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(cbTechnician3, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(cbWorker1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(cbWorker2, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 5;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(2, 20, 2, 20);
    jPanel43.add(cbWorker3, gridBagConstraints);

    btnStaffSave.setText("Save");
    btnStaffSave.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnStaffSaveActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.insets = new java.awt.Insets(11, 11, 11, 11);
    jPanel43.add(btnStaffSave, gridBagConstraints);

    jTabbedPane1.addTab("Staff", jPanel43);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipadx = 95;
    gridBagConstraints.ipady = 95;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel3.add(jTabbedPane1, gridBagConstraints);

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

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

    jLabel1.setFont(new java.awt.Font("Dialog", 3, 24)); // NOI18N
    jLabel1.setText("A & J Entry Recorder");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);
    jPanel4.add(jLabel1, gridBagConstraints);

    labShift.setText("shift");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    jPanel4.add(labShift, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    getContentPane().add(jPanel4, gridBagConstraints);

    pack();
}

From source file:v800_trainer.JCicloTronic.java

/** This method is called from within the constructor to
 * initialize the form.// w ww  . ja  v  a  2 s  .  c om
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the FormEditor.
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    buttonGroup_Karte = new javax.swing.ButtonGroup();
    Hauptfenster = new javax.swing.JTabbedPane();
    Datenliste_Panel = new javax.swing.JPanel();
    Datenliste_scroll_Panel = new javax.swing.JScrollPane();
    Datentabelle = new javax.swing.JTable();
    Datenliste_Jahr = new javax.swing.JComboBox();
    Datenliste_Monat = new javax.swing.JComboBox();
    jLabel11 = new javax.swing.JLabel();
    jLabel51 = new javax.swing.JLabel();
    Datenliste_Zeitabschnitt = new javax.swing.JComboBox();
    jLabel65 = new javax.swing.JLabel();
    jLabel66 = new javax.swing.JLabel();
    Datenliste_TourTyp = new javax.swing.JComboBox();
    jLabel68 = new javax.swing.JLabel();
    jLabel69_Selektiert = new javax.swing.JLabel();
    Datenliste_search = new javax.swing.JTextField();
    Datenliste_searchButton = new javax.swing.JButton();
    jLabel_search = new javax.swing.JLabel();
    Info_Panel = new javax.swing.JPanel();
    Auswahl_Info = new javax.swing.JComboBox();
    Info_Titel = new javax.swing.JTextField();
    Info_Vorname = new javax.swing.JTextField();
    Info_Name = new javax.swing.JTextField();
    Info_GebTag = new javax.swing.JTextField();
    Info_Gewicht = new javax.swing.JTextField();
    Info_Verein = new javax.swing.JTextField();
    Info_Material = new javax.swing.JTextField();
    Info_Materialgewicht = new javax.swing.JTextField();
    Info_Startort = new javax.swing.JTextField();
    Info_Zielort = new javax.swing.JTextField();
    jLabel24Uhrzeit = new javax.swing.JLabel();
    jLabel24 = new javax.swing.JLabel();
    jLabel52 = new javax.swing.JLabel();
    jLabel53 = new javax.swing.JLabel();
    jLabel54 = new javax.swing.JLabel();
    jLabel55 = new javax.swing.JLabel();
    jLabel56 = new javax.swing.JLabel();
    jLabel57 = new javax.swing.JLabel();
    jLabel58 = new javax.swing.JLabel();
    jLabel59 = new javax.swing.JLabel();
    jLabel60 = new javax.swing.JLabel();
    jLabel61 = new javax.swing.JLabel();
    Info_Button_kopieren = new javax.swing.JButton();
    Info_Button_einfgen = new javax.swing.JButton();
    jScrollPane2 = new javax.swing.JScrollPane();
    Info_Notiz = new javax.swing.JTextArea();
    Info_Button_speichern = new javax.swing.JButton();
    jLabel63 = new javax.swing.JLabel();
    jLabel64 = new javax.swing.JLabel();
    jLabel65Typ = new javax.swing.JLabel();
    jLabel69 = new javax.swing.JLabel();
    Info_Button_Suche_TrackLog = new javax.swing.JButton();
    Info_Track_Log = new javax.swing.JTextField();
    Statistik_Panel = new javax.swing.JPanel();
    Auswahl_Statistik = new javax.swing.JComboBox();
    jPanel2 = new javax.swing.JPanel();
    Statistik_Hhe = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    Statistik_Minimale_Hhe = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    Statistik_Maximale_Hhe = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    Statistik_Summe_Hm_Steigung = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    Statistik_Summe_Hm_Geflle = new javax.swing.JLabel();
    jLabel17 = new javax.swing.JLabel();
    Statistik_HM_pro_km = new javax.swing.JLabel();
    Statistik_Geschwindigkeit = new javax.swing.JPanel();
    jLabel5 = new javax.swing.JLabel();
    Statistik_Max_Geschw = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    Statistik_av_Geschw = new javax.swing.JLabel();
    Statistik_Herzfrequenz = new javax.swing.JPanel();
    jLabel7 = new javax.swing.JLabel();
    Statistik_max_HF = new javax.swing.JLabel();
    jLabel8 = new javax.swing.JLabel();
    Statistik_av_HF = new javax.swing.JLabel();
    Statistik_Steigung_m = new javax.swing.JPanel();
    jLabel9 = new javax.swing.JLabel();
    Statistik_max_Steigung_m = new javax.swing.JLabel();
    jLabel10 = new javax.swing.JLabel();
    Statistik_av_Steigung_m = new javax.swing.JLabel();
    Statistik_Geflle_m = new javax.swing.JPanel();
    jLabel12 = new javax.swing.JLabel();
    Statistik_max_Geflle_m = new javax.swing.JLabel();
    jLabel13 = new javax.swing.JLabel();
    Statistik_av_Geflle_m = new javax.swing.JLabel();
    Statistik_Temperatur = new javax.swing.JPanel();
    jLabel14 = new javax.swing.JLabel();
    Statistik_min_Temp = new javax.swing.JLabel();
    jLabel15 = new javax.swing.JLabel();
    Statistik_max_Temp = new javax.swing.JLabel();
    jLabel16 = new javax.swing.JLabel();
    Statistik_av_Temp = new javax.swing.JLabel();
    Statistik_Cadence = new javax.swing.JPanel();
    jLabel18 = new javax.swing.JLabel();
    Statistik_max_Cadence = new javax.swing.JLabel();
    jLabel19 = new javax.swing.JLabel();
    Statistik_av_Cadence = new javax.swing.JLabel();
    Statistik_Steigung_p = new javax.swing.JPanel();
    jLabel20 = new javax.swing.JLabel();
    Statistik_max_Steigung_p = new javax.swing.JLabel();
    jLabel21 = new javax.swing.JLabel();
    Statistik_av_Steigung_p = new javax.swing.JLabel();
    Statistik_Geflle_p = new javax.swing.JPanel();
    jLabel22 = new javax.swing.JLabel();
    Statistik_max_Geflle_p = new javax.swing.JLabel();
    jLabel23 = new javax.swing.JLabel();
    Statistik_av_Geflle_p = new javax.swing.JLabel();
    Statistik_Zeit = new javax.swing.JPanel();
    jLabel47 = new javax.swing.JLabel();
    Statistik_Zeit_absolut = new javax.swing.JLabel();
    jLabel48 = new javax.swing.JLabel();
    Statistik_Zeit_aktiv = new javax.swing.JLabel();
    jPanel5 = new javax.swing.JPanel();
    jLabel25 = new javax.swing.JLabel();
    Statistik_Teilstrecke = new javax.swing.JLabel();
    Statistik_Schrittlnge = new javax.swing.JPanel();
    jLabel26 = new javax.swing.JLabel();
    Statistik_max_Schrittlnge = new javax.swing.JLabel();
    jLabel28 = new javax.swing.JLabel();
    Statistik_av_Schrittlnge = new javax.swing.JLabel();
    Statistik_Training = new javax.swing.JPanel();
    jLabel29 = new javax.swing.JLabel();
    Statistik_Belastung = new javax.swing.JLabel();
    jLabel30 = new javax.swing.JLabel();
    Statistik_Erholungszeit = new javax.swing.JLabel();
    jLabel35 = new javax.swing.JLabel();
    Statistik_Lauf_Index = new javax.swing.JLabel();
    Statistik_Kalorien = new javax.swing.JPanel();
    jLabel31 = new javax.swing.JLabel();
    Statistik_Kalorien_absolut = new javax.swing.JLabel();
    jLabel34 = new javax.swing.JLabel();
    Statistik_Kalorien_h = new javax.swing.JLabel();
    jLabel32 = new javax.swing.JLabel();
    Statistik_Fett = new javax.swing.JLabel();
    jLabel33 = new javax.swing.JLabel();
    Statistik_Protein = new javax.swing.JLabel();
    jPanel3 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    Statistik_Titel = new javax.swing.JLabel();
    Graphik_Panel = new javax.swing.JPanel();
    Auswahl_Graphik = new javax.swing.JComboBox();
    Graphik_Sub_Panel = new javax.swing.JPanel();
    Graphik_check_Geschwindigkeit = new javax.swing.JCheckBox();
    Graphik_check_Hhe = new javax.swing.JCheckBox();
    Graphik_check_HF = new javax.swing.JCheckBox();
    Graphik_check_Temp = new javax.swing.JCheckBox();
    Graphik_check_Steigung_p = new javax.swing.JCheckBox();
    Graphik_check_Steigung_m = new javax.swing.JCheckBox();
    Graphik_check_Cadence = new javax.swing.JCheckBox();
    Graphik_Radio_Strecke = new javax.swing.JRadioButton();
    Graphik_Radio_Zeit = new javax.swing.JRadioButton();
    Graphik_check_Abstand = new javax.swing.JCheckBox();
    Graphik_check_av_Geschw = new javax.swing.JCheckBox();
    Graphik_check_Schrittlnge = new javax.swing.JCheckBox();
    Histogramm_Panel = new javax.swing.JPanel();
    Auswahl_Histogramm = new javax.swing.JComboBox();
    Summenhistogramm_Check = new javax.swing.JCheckBox();
    jPanel1 = new javax.swing.JPanel();
    jPanel18_HistoSP = new javax.swing.JPanel();
    jPanel17_HistoHM = new javax.swing.JPanel();
    jPanel16_HistoHF = new javax.swing.JPanel();
    jPanel19_HistoCd = new javax.swing.JPanel();
    jLabel26_Histotitel = new javax.swing.JLabel();
    Map_Panel = new javax.swing.JPanel();
    Auswahl_Map = new javax.swing.JComboBox();
    LoadGoogleEarth = new javax.swing.JButton();
    Kein_kmz_text = new javax.swing.JLabel();
    Map_internal_Panel = new javax.swing.JPanel();
    jLabel_map_streckenlnge = new javax.swing.JLabel();
    jLabel27 = new javax.swing.JLabel();
    Map_Type = new javax.swing.JComboBox<>();
    Jahresuebersicht_Panel = new javax.swing.JPanel();
    Auswahl_bersicht = new javax.swing.JComboBox();
    JahrVergleich = new javax.swing.JComboBox();
    jLabel67 = new javax.swing.JLabel();
    jLabel70 = new javax.swing.JLabel();
    jRadioButton_jahresverlauf = new javax.swing.JRadioButton();
    jRadioButton_monatsbersicht = new javax.swing.JRadioButton();
    jPanel17bersichtchart = new javax.swing.JPanel();
    jMenuHaupt = new javax.swing.JMenuBar();
    jMenuDatei = new javax.swing.JMenu();
    jMenuOpen = new javax.swing.JMenuItem();
    jMenuOpenall = new javax.swing.JMenuItem();
    jSeparator1 = new javax.swing.JSeparator();
    jMenuLschen = new javax.swing.JMenuItem();
    jMenuExit = new javax.swing.JMenuItem();
    jMenu_V800_Laden = new javax.swing.JMenu();
    jMenuTourEditor = new javax.swing.JMenu();
    jMenuEinstellungen = new javax.swing.JMenu();
    jMenuHilfe = new javax.swing.JMenu();

    setTitle("HWCyclingData");
    setPreferredSize(new java.awt.Dimension(800, 600));
    addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentResized(java.awt.event.ComponentEvent evt) {
            formComponentResized(evt);
        }
    });
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent evt) {
            exitForm(evt);
        }
    });
    java.awt.GridBagLayout layout = new java.awt.GridBagLayout();
    layout.columnWidths = new int[] { 0 };
    layout.rowHeights = new int[] { 0 };
    getContentPane().setLayout(layout);

    Hauptfenster.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    Hauptfenster.setAlignmentX(0.0F);
    Hauptfenster.setAlignmentY(0.0F);
    Hauptfenster.setAutoscrolls(true);
    Hauptfenster.setPreferredSize(new java.awt.Dimension(10, 10));

    java.awt.GridBagLayout Datenliste_PanelLayout = new java.awt.GridBagLayout();
    Datenliste_PanelLayout.columnWidths = new int[] { 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0 };
    Datenliste_PanelLayout.rowHeights = new int[] { 0, 5, 0, 5, 0 };
    Datenliste_Panel.setLayout(Datenliste_PanelLayout);

    Datenliste_scroll_Panel.setAutoscrolls(true);

    Datentabelle.setAutoCreateColumnsFromModel(false);
    Datentabelle.setFont(Datentabelle.getFont());
    Datentabelle.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_LAST_COLUMN);
    Datentabelle.setRowHeight(25);
    //ChangeModel();
    Datentabelle.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
        public void mouseDragged(java.awt.event.MouseEvent evt) {
            DatentabelleMouseDragged(evt);
        }
    });
    Datentabelle.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            DatentabelleMouseClicked(evt);
        }
    });
    Datenliste_scroll_Panel.setViewportView(Datentabelle);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 19;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.ipady = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Datenliste_Panel.add(Datenliste_scroll_Panel, gridBagConstraints);

    Datenliste_Jahr.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Datenliste_JahrActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(Datenliste_Jahr, gridBagConstraints);

    Datenliste_Monat.setEnabled(false);
    InitComboMonat();
    Datenliste_Monat.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Datenliste_MonatActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 12;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(Datenliste_Monat, gridBagConstraints);

    jLabel11.setText("Jahr whlen");
    jLabel11.setToolTipText("Selektier alle Daten des entsprechenden Jahres");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(jLabel11, gridBagConstraints);

    jLabel51.setText("Monat whlen");
    jLabel51.setToolTipText("Selektiert alle Daten des entsprechenden Monats");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 12;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(jLabel51, gridBagConstraints);

    Datenliste_Zeitabschnitt.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Datenliste_ZeitabschnittActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(Datenliste_Zeitabschnitt, gridBagConstraints);

    jLabel65.setText("Zeitraum whlen");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(jLabel65, gridBagConstraints);

    jLabel66.setText("Tour-Typ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(jLabel66, gridBagConstraints);

    Datenliste_TourTyp.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Datenliste_TourTypActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(Datenliste_TourTyp, gridBagConstraints);

    jLabel68.setText("Selektierte Daten / von");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 14;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(jLabel68, gridBagConstraints);

    jLabel69_Selektiert.setText("'                                                 '");
    jLabel69_Selektiert.setMaximumSize(new java.awt.Dimension(300, 50));
    jLabel69_Selektiert.setMinimumSize(new java.awt.Dimension(300, 50));
    jLabel69_Selektiert.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 14;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    Datenliste_Panel.add(jLabel69_Selektiert, gridBagConstraints);

    Datenliste_search.setToolTipText("~ Vorstellen um zu Deselektieren");
    Datenliste_search.setMaximumSize(new java.awt.Dimension(200, 23));
    Datenliste_search.setMinimumSize(new java.awt.Dimension(200, 23));
    Datenliste_search.setPreferredSize(new java.awt.Dimension(200, 23));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 16;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(Datenliste_search, gridBagConstraints);

    Datenliste_searchButton.setText("Suchen");
    Datenliste_searchButton.setMaximumSize(new java.awt.Dimension(200, 23));
    Datenliste_searchButton.setMinimumSize(new java.awt.Dimension(200, 23));
    Datenliste_searchButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Datenliste_searchButtonActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 18;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(Datenliste_searchButton, gridBagConstraints);

    jLabel_search.setText("Eintrag im Titel suchen");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 16;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(jLabel_search, gridBagConstraints);

    Hauptfenster.addTab("Datenliste", null, Datenliste_Panel, "");

    Info_Panel.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            Info_PanelComponentShown(evt);
        }
    });
    java.awt.GridBagLayout Info_PanelLayout = new java.awt.GridBagLayout();
    Info_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 };
    Info_PanelLayout.rowHeights = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5,
            0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 };
    Info_Panel.setLayout(Info_PanelLayout);

    Auswahl_Info.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Auswahl_InfoActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Info_Panel.add(Auswahl_Info, gridBagConstraints);

    Info_Titel.setText("jTextField1");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.gridwidth = 19;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Titel, gridBagConstraints);

    Info_Vorname.setText("jTextField4");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Vorname, gridBagConstraints);

    Info_Name.setText("jTextField5");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Name, gridBagConstraints);

    Info_GebTag.setText("jTextField6");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 14;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_GebTag, gridBagConstraints);

    Info_Gewicht.setText("jTextField7");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 14;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Gewicht, gridBagConstraints);

    Info_Verein.setText("jTextField8");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 18;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Verein, gridBagConstraints);

    Info_Material.setText("jTextField10");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 22;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Material, gridBagConstraints);

    Info_Materialgewicht.setText("jTextField9");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 22;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Materialgewicht, gridBagConstraints);

    Info_Startort.setText("jTextField2");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 26;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Startort, gridBagConstraints);

    Info_Zielort.setText("jTextField3");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 26;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Zielort, gridBagConstraints);

    jLabel24Uhrzeit.setText("jLabel24");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel24Uhrzeit, gridBagConstraints);

    jLabel24.setText("Titel");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel24, gridBagConstraints);

    jLabel52.setText("Vorname");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel52, gridBagConstraints);

    jLabel53.setText("Name");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel53, gridBagConstraints);

    jLabel54.setText("Geburtsdatum");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 12;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel54, gridBagConstraints);

    jLabel55.setText("Gewicht");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 12;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel55, gridBagConstraints);

    jLabel56.setText("Verein / Mitfahrer");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 16;
    gridBagConstraints.gridwidth = 17;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel56, gridBagConstraints);

    jLabel57.setText("Material");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 20;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel57, gridBagConstraints);

    jLabel58.setText("Materialgewicht");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 20;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel58, gridBagConstraints);

    jLabel59.setText("Startort");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 24;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel59, gridBagConstraints);

    jLabel60.setText("Zielort");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 24;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel60, gridBagConstraints);

    jLabel61.setText("Notiz");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 34;
    gridBagConstraints.gridwidth = 9;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel61, gridBagConstraints);

    Info_Button_kopieren.setText("Kopieren");
    Info_Button_kopieren.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Info_Button_kopierenActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 18;
    gridBagConstraints.gridy = 18;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Button_kopieren, gridBagConstraints);

    Info_Button_einfgen.setText("Einfgen");
    Info_Button_einfgen.setEnabled(false);
    Info_Button_einfgen.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Info_Button_einfgenActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 18;
    gridBagConstraints.gridy = 22;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Button_einfgen, gridBagConstraints);

    Info_Notiz.setLineWrap(true);
    jScrollPane2.setViewportView(Info_Notiz);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 36;
    gridBagConstraints.gridwidth = 19;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Info_Panel.add(jScrollPane2, gridBagConstraints);

    Info_Button_speichern.setText("Speichern");
    Info_Button_speichern.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Info_Button_speichernActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 18;
    gridBagConstraints.gridy = 26;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Button_speichern, gridBagConstraints);

    jLabel63.setText("Startzeit:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel63, gridBagConstraints);

    jLabel64.setText("Typ:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 10;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel64, gridBagConstraints);

    jLabel65Typ.setText("jLabel65");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 12;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel65Typ, gridBagConstraints);

    jLabel69.setText("Track Log");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 30;
    gridBagConstraints.gridwidth = 7;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel69, gridBagConstraints);

    Info_Button_Suche_TrackLog.setText("...");
    Info_Button_Suche_TrackLog.setToolTipText("Track Log ndern");
    Info_Button_Suche_TrackLog.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Info_Button_Suche_TrackLogActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 18;
    gridBagConstraints.gridy = 32;
    gridBagConstraints.ipady = -3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Button_Suche_TrackLog, gridBagConstraints);

    Info_Track_Log.setText("jTextField1");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 32;
    gridBagConstraints.gridwidth = 17;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    Info_Panel.add(Info_Track_Log, gridBagConstraints);

    Hauptfenster.addTab("Infos", null, Info_Panel, "");

    Statistik_Panel.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            Statistik_PanelComponentShown_StatistikStarten(evt);
        }
    });
    java.awt.GridBagLayout Statistik_PanelLayout1 = new java.awt.GridBagLayout();
    Statistik_PanelLayout1.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 };
    Statistik_PanelLayout1.rowHeights = new int[] { 0, 10, 0, 10, 0, 10, 0, 10, 0 };
    Statistik_Panel.setLayout(Statistik_PanelLayout1);

    Auswahl_Statistik.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Auswahl_StatistikActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Statistik_Panel.add(Auswahl_Statistik, gridBagConstraints);

    java.awt.GridBagLayout jPanel2Layout = new java.awt.GridBagLayout();
    jPanel2Layout.columnWidths = new int[] { 0, 10, 0, 10, 0, 10, 0, 10, 0 };
    jPanel2Layout.rowHeights = new int[] { 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0 };
    jPanel2.setLayout(jPanel2Layout);

    Statistik_Hhe.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Hhe [m]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Hhe.setLayout(new java.awt.GridLayout(5, 2, 5, 5));

    jLabel1.setText("min.:");
    Statistik_Hhe.add(jLabel1);

    Statistik_Minimale_Hhe.setText("---");
    Statistik_Minimale_Hhe.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
    Statistik_Hhe.add(Statistik_Minimale_Hhe);

    jLabel2.setText("max.:");
    Statistik_Hhe.add(jLabel2);

    Statistik_Maximale_Hhe.setText("---");
    Statistik_Hhe.add(Statistik_Maximale_Hhe);

    jLabel3.setText("Hm +:");
    Statistik_Hhe.add(jLabel3);

    Statistik_Summe_Hm_Steigung.setText("---");
    Statistik_Hhe.add(Statistik_Summe_Hm_Steigung);

    jLabel4.setText("Hm -:");
    Statistik_Hhe.add(jLabel4);

    Statistik_Summe_Hm_Geflle.setText("---");
    Statistik_Hhe.add(Statistik_Summe_Hm_Geflle);

    jLabel17.setText("Hm/km:");
    Statistik_Hhe.add(jLabel17);

    Statistik_HM_pro_km.setText("---");
    Statistik_Hhe.add(Statistik_HM_pro_km);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.gridheight = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Hhe, gridBagConstraints);

    Statistik_Geschwindigkeit
            .setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Geschwindigkeit [km/h]",
                    javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Geschwindigkeit.setLayout(new java.awt.GridLayout(3, 2, 5, 5));

    jLabel5.setText("max.:");
    jLabel5.setToolTipText("");
    Statistik_Geschwindigkeit.add(jLabel5);

    Statistik_Max_Geschw.setText("---");
    Statistik_Geschwindigkeit.add(Statistik_Max_Geschw);

    jLabel6.setText("Durchschnitt:");
    Statistik_Geschwindigkeit.add(jLabel6);

    Statistik_av_Geschw.setText("---");
    Statistik_Geschwindigkeit.add(Statistik_av_Geschw);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Geschwindigkeit, gridBagConstraints);

    Statistik_Herzfrequenz.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Herzfrequenz [p/min]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Herzfrequenz.setLayout(new java.awt.GridLayout(3, 2, 5, 5));

    jLabel7.setText("max.:");
    Statistik_Herzfrequenz.add(jLabel7);

    Statistik_max_HF.setText("---");
    Statistik_Herzfrequenz.add(Statistik_max_HF);

    jLabel8.setText("Durchschnitt:");
    Statistik_Herzfrequenz.add(jLabel8);

    Statistik_av_HF.setText("---");
    Statistik_Herzfrequenz.add(Statistik_av_HF);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Herzfrequenz, gridBagConstraints);

    Statistik_Steigung_m.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Steigung [m/min]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Steigung_m.setLayout(new java.awt.GridLayout(2, 2, 5, 5));

    jLabel9.setText("max.:");
    Statistik_Steigung_m.add(jLabel9);

    Statistik_max_Steigung_m.setText("---");
    Statistik_Steigung_m.add(Statistik_max_Steigung_m);

    jLabel10.setText("Durchschnitt:");
    Statistik_Steigung_m.add(jLabel10);

    Statistik_av_Steigung_m.setText("---");
    Statistik_Steigung_m.add(Statistik_av_Steigung_m);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Steigung_m, gridBagConstraints);

    Statistik_Geflle_m.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Geflle [m/min]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Geflle_m.setLayout(new java.awt.GridLayout(2, 2, 5, 5));

    jLabel12.setText("max.:");
    Statistik_Geflle_m.add(jLabel12);

    Statistik_max_Geflle_m.setText("---");
    Statistik_Geflle_m.add(Statistik_max_Geflle_m);

    jLabel13.setText("Durchschnitt:");
    Statistik_Geflle_m.add(jLabel13);

    Statistik_av_Geflle_m.setText("---");
    Statistik_Geflle_m.add(Statistik_av_Geflle_m);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Geflle_m, gridBagConstraints);

    Statistik_Temperatur.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Temperatur [C]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Temperatur.setLayout(new java.awt.GridLayout(3, 2, 5, 5));

    jLabel14.setText("min.:");
    Statistik_Temperatur.add(jLabel14);

    Statistik_min_Temp.setText("---");
    Statistik_Temperatur.add(Statistik_min_Temp);

    jLabel15.setText("max.:");
    Statistik_Temperatur.add(jLabel15);

    Statistik_max_Temp.setText("---");
    Statistik_Temperatur.add(Statistik_max_Temp);

    jLabel16.setText("Durchschnitt:");
    Statistik_Temperatur.add(jLabel16);

    Statistik_av_Temp.setText("---");
    Statistik_Temperatur.add(Statistik_av_Temp);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Temperatur, gridBagConstraints);

    Statistik_Cadence.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cadence [n/min]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Cadence.setLayout(new java.awt.GridLayout(2, 2, 5, 5));

    jLabel18.setText("max.:");
    Statistik_Cadence.add(jLabel18);

    Statistik_max_Cadence.setText("---");
    Statistik_Cadence.add(Statistik_max_Cadence);

    jLabel19.setText("Durchschnitt:");
    Statistik_Cadence.add(jLabel19);

    Statistik_av_Cadence.setText("---");
    Statistik_Cadence.add(Statistik_av_Cadence);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Cadence, gridBagConstraints);

    Statistik_Steigung_p.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Steigung [%]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Steigung_p.setLayout(new java.awt.GridLayout(2, 2, 5, 5));

    jLabel20.setText("max.:");
    Statistik_Steigung_p.add(jLabel20);

    Statistik_max_Steigung_p.setText("---");
    Statistik_Steigung_p.add(Statistik_max_Steigung_p);

    jLabel21.setText("Durchschnitt:");
    Statistik_Steigung_p.add(jLabel21);

    Statistik_av_Steigung_p.setText("---");
    Statistik_Steigung_p.add(Statistik_av_Steigung_p);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Steigung_p, gridBagConstraints);

    Statistik_Geflle_p.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Geflle [%]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Geflle_p.setLayout(new java.awt.GridLayout(2, 2, 5, 5));

    jLabel22.setText("max.:");
    Statistik_Geflle_p.add(jLabel22);

    Statistik_max_Geflle_p.setText("---");
    Statistik_Geflle_p.add(Statistik_max_Geflle_p);

    jLabel23.setText("Durchschnitt:");
    Statistik_Geflle_p.add(jLabel23);

    Statistik_av_Geflle_p.setText("---");
    Statistik_Geflle_p.add(Statistik_av_Geflle_p);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Geflle_p, gridBagConstraints);

    Statistik_Zeit.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Zeit [hh:mm:ss]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Zeit.setLayout(new java.awt.GridLayout(3, 2, 5, 5));

    jLabel47.setText("absolut:");
    Statistik_Zeit.add(jLabel47);

    Statistik_Zeit_absolut.setText("---");
    Statistik_Zeit.add(Statistik_Zeit_absolut);

    jLabel48.setText("gefahren:");
    Statistik_Zeit.add(jLabel48);

    Statistik_Zeit_aktiv.setText("---");
    Statistik_Zeit.add(Statistik_Zeit_aktiv);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Zeit, gridBagConstraints);

    jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Zoom",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    jPanel5.setPreferredSize(new java.awt.Dimension(270, 65));
    jPanel5.setLayout(new java.awt.GridLayout(1, 0));

    jLabel25.setText("Teilstrecke:  ");
    jLabel25.setMaximumSize(new java.awt.Dimension(200, 26));
    jLabel25.setMinimumSize(new java.awt.Dimension(200, 26));
    jLabel25.setPreferredSize(new java.awt.Dimension(200, 26));
    jPanel5.add(jLabel25);

    Statistik_Teilstrecke.setText("jLabel26");
    jPanel5.add(Statistik_Teilstrecke);
    Statistik_Teilstrecke.getAccessibleContext().setAccessibleName("jLabel26_Teilstrecke");

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
    jPanel2.add(jPanel5, gridBagConstraints);

    Statistik_Schrittlnge.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Schrittlnge [cm]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Schrittlnge.setLayout(new java.awt.GridLayout(2, 2, 5, 5));

    jLabel26.setText("max.:");
    Statistik_Schrittlnge.add(jLabel26);

    Statistik_max_Schrittlnge.setText("---");
    Statistik_Schrittlnge.add(Statistik_max_Schrittlnge);

    jLabel28.setText("Durchschnitt:");
    Statistik_Schrittlnge.add(jLabel28);

    Statistik_av_Schrittlnge.setText("---");
    Statistik_Schrittlnge.add(Statistik_av_Schrittlnge);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Schrittlnge, gridBagConstraints);

    Statistik_Training.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Training",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Training.setLayout(new java.awt.GridLayout(4, 2, 5, 5));

    jLabel29.setText("Belastung:");
    Statistik_Training.add(jLabel29);

    Statistik_Belastung.setText("---");
    Statistik_Training.add(Statistik_Belastung);

    jLabel30.setText("Erholungszeit:");
    Statistik_Training.add(jLabel30);

    Statistik_Erholungszeit.setText("---");
    Statistik_Training.add(Statistik_Erholungszeit);

    jLabel35.setText("Lauf-Index:");
    Statistik_Training.add(jLabel35);

    Statistik_Lauf_Index.setText("---");
    Statistik_Training.add(Statistik_Lauf_Index);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Training, gridBagConstraints);

    Statistik_Kalorien.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Kalorien",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Kalorien.setLayout(new java.awt.GridLayout(4, 2, 5, 5));

    jLabel31.setText("kCal");
    Statistik_Kalorien.add(jLabel31);

    Statistik_Kalorien_absolut.setText("---");
    Statistik_Kalorien.add(Statistik_Kalorien_absolut);

    jLabel34.setText("kCal/h");
    Statistik_Kalorien.add(jLabel34);

    Statistik_Kalorien_h.setText("---");
    Statistik_Kalorien.add(Statistik_Kalorien_h);

    jLabel32.setText("Fett [%]");
    Statistik_Kalorien.add(jLabel32);

    Statistik_Fett.setText("---");
    Statistik_Kalorien.add(Statistik_Fett);

    jLabel33.setText("Protein [%]");
    Statistik_Kalorien.add(jLabel33);

    Statistik_Protein.setText("---");
    Statistik_Kalorien.add(Statistik_Protein);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Kalorien, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Statistik_Panel.add(jPanel2, gridBagConstraints);

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
    gridBagConstraints.weighty = 100.0;
    Statistik_Panel.add(jPanel3, gridBagConstraints);

    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(jPanel4Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 10;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 100.0;
    Statistik_Panel.add(jPanel4, gridBagConstraints);

    Statistik_Titel.setText("jLabel26");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Statistik_Panel.add(Statistik_Titel, gridBagConstraints);

    Hauptfenster.addTab("Statistik", null, Statistik_Panel, "");

    Graphik_Panel.setMinimumSize(new java.awt.Dimension(22, 22));
    Graphik_Panel.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            Graphik_PanelComponentShown(evt);
        }

        public void componentHidden(java.awt.event.ComponentEvent evt) {
            Graphik_PanelComponentHidden(evt);
        }
    });
    java.awt.GridBagLayout Graphik_PanelLayout = new java.awt.GridBagLayout();
    Graphik_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 };
    Graphik_PanelLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0 };
    Graphik_Panel.setLayout(Graphik_PanelLayout);

    Auswahl_Graphik.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Auswahl_GraphikActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.ipady = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Graphik_Panel.add(Auswahl_Graphik, gridBagConstraints);

    Graphik_Sub_Panel.setMinimumSize(new java.awt.Dimension(0, 0));
    Graphik_Sub_Panel.setPreferredSize(new java.awt.Dimension(0, 0));

    javax.swing.GroupLayout Graphik_Sub_PanelLayout = new javax.swing.GroupLayout(Graphik_Sub_Panel);
    Graphik_Sub_Panel.setLayout(Graphik_Sub_PanelLayout);
    Graphik_Sub_PanelLayout.setHorizontalGroup(Graphik_Sub_PanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    Graphik_Sub_PanelLayout.setVerticalGroup(Graphik_Sub_PanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 15;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Graphik_Panel.add(Graphik_Sub_Panel, gridBagConstraints);

    Graphik_check_Geschwindigkeit.setText("Geschwindigkeit");
    Graphik_check_Geschwindigkeit.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_GeschwindigkeitActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = java.awt.GridBagConstraints.RELATIVE;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Geschwindigkeit, gridBagConstraints);

    Graphik_check_Hhe.setText("Hhe");
    Graphik_check_Hhe.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_HheActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Hhe, gridBagConstraints);

    Graphik_check_HF.setText("Herzfrequenz");
    Graphik_check_HF.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_HFActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_HF, gridBagConstraints);

    Graphik_check_Temp.setText("Temperatur");
    Graphik_check_Temp.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_TempActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 14;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Temp, gridBagConstraints);

    Graphik_check_Steigung_p.setText("Steigung [%]");
    Graphik_check_Steigung_p.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_Steigung_pActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 12;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Steigung_p, gridBagConstraints);

    Graphik_check_Steigung_m.setText("Steigung [m/min]");
    Graphik_check_Steigung_m.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_Steigung_mActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 12;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Steigung_m, gridBagConstraints);

    Graphik_check_Cadence.setText("Cadence");
    Graphik_check_Cadence.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_CadenceActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 10;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Cadence, gridBagConstraints);

    Graphik_Radio_Strecke.setSelected(true);
    Graphik_Radio_Strecke.setText("ber Strecke");
    Graphik_Radio_Strecke.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_Radio_StreckeActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 0);
    Graphik_Panel.add(Graphik_Radio_Strecke, gridBagConstraints);

    Graphik_Radio_Zeit.setText("ber Zeit");
    Graphik_Radio_Zeit.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_Radio_ZeitActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.ipady = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 0);
    Graphik_Panel.add(Graphik_Radio_Zeit, gridBagConstraints);

    Graphik_check_Abstand.setText("Zeit- / Streckenabstand");
    Graphik_check_Abstand.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_AbstandActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 14;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 27;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Abstand, gridBagConstraints);

    Graphik_check_av_Geschw.setText("av-Geschw.");
    Graphik_check_av_Geschw.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_av_GeschwActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_av_Geschw, gridBagConstraints);

    Graphik_check_Schrittlnge.setText("Schrittlnge");
    Graphik_check_Schrittlnge.setToolTipText("");
    Graphik_check_Schrittlnge.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_SchrittlngeActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 10;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Schrittlnge, gridBagConstraints);

    Hauptfenster.addTab("Graphik", null, Graphik_Panel, "");

    Histogramm_Panel.setMinimumSize(new java.awt.Dimension(22, 22));
    Histogramm_Panel.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            Histogramm_PanelComponentShown(evt);
        }
    });
    java.awt.GridBagLayout Histogramm_PanelLayout = new java.awt.GridBagLayout();
    Histogramm_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0 };
    Histogramm_PanelLayout.rowHeights = new int[] { 0, 0, 0, 0, 0 };
    Histogramm_Panel.setLayout(Histogramm_PanelLayout);

    Auswahl_Histogramm.setAlignmentX(0.0F);
    Auswahl_Histogramm.setAlignmentY(0.0F);
    Auswahl_Histogramm.setMinimumSize(new java.awt.Dimension(200, 20));
    Auswahl_Histogramm.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Auswahl_HistogrammActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Histogramm_Panel.add(Auswahl_Histogramm, gridBagConstraints);

    Summenhistogramm_Check.setText("Summenhistogramme");
    Summenhistogramm_Check.setAlignmentY(0.0F);
    Summenhistogramm_Check.setMaximumSize(new java.awt.Dimension(32767, 32767));
    Summenhistogramm_Check.setMinimumSize(new java.awt.Dimension(300, 23));
    Summenhistogramm_Check.setOpaque(false);
    Summenhistogramm_Check.setPreferredSize(new java.awt.Dimension(300, 23));
    Summenhistogramm_Check.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Summenhistogramm_CheckActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Histogramm_Panel.add(Summenhistogramm_Check, gridBagConstraints);

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

    jPanel18_HistoSP.setAlignmentX(0.0F);
    jPanel18_HistoSP.setAlignmentY(0.0F);

    javax.swing.GroupLayout jPanel18_HistoSPLayout = new javax.swing.GroupLayout(jPanel18_HistoSP);
    jPanel18_HistoSP.setLayout(jPanel18_HistoSPLayout);
    jPanel18_HistoSPLayout.setHorizontalGroup(jPanel18_HistoSPLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel18_HistoSPLayout.setVerticalGroup(jPanel18_HistoSPLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.weighty = 0.5;
    jPanel1.add(jPanel18_HistoSP, gridBagConstraints);

    jPanel17_HistoHM.setAlignmentX(0.0F);
    jPanel17_HistoHM.setAlignmentY(0.0F);

    javax.swing.GroupLayout jPanel17_HistoHMLayout = new javax.swing.GroupLayout(jPanel17_HistoHM);
    jPanel17_HistoHM.setLayout(jPanel17_HistoHMLayout);
    jPanel17_HistoHMLayout.setHorizontalGroup(jPanel17_HistoHMLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel17_HistoHMLayout.setVerticalGroup(jPanel17_HistoHMLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.weighty = 0.5;
    jPanel1.add(jPanel17_HistoHM, gridBagConstraints);

    jPanel16_HistoHF.setAlignmentX(0.0F);
    jPanel16_HistoHF.setAlignmentY(0.0F);

    javax.swing.GroupLayout jPanel16_HistoHFLayout = new javax.swing.GroupLayout(jPanel16_HistoHF);
    jPanel16_HistoHF.setLayout(jPanel16_HistoHFLayout);
    jPanel16_HistoHFLayout.setHorizontalGroup(jPanel16_HistoHFLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel16_HistoHFLayout.setVerticalGroup(jPanel16_HistoHFLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));

    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 = 0.5;
    gridBagConstraints.weighty = 0.5;
    jPanel1.add(jPanel16_HistoHF, gridBagConstraints);

    jPanel19_HistoCd.setAlignmentX(0.0F);
    jPanel19_HistoCd.setAlignmentY(0.0F);

    javax.swing.GroupLayout jPanel19_HistoCdLayout = new javax.swing.GroupLayout(jPanel19_HistoCd);
    jPanel19_HistoCd.setLayout(jPanel19_HistoCdLayout);
    jPanel19_HistoCdLayout.setHorizontalGroup(jPanel19_HistoCdLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel19_HistoCdLayout.setVerticalGroup(jPanel19_HistoCdLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.weighty = 0.5;
    jPanel1.add(jPanel19_HistoCd, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.gridheight = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Histogramm_Panel.add(jPanel1, gridBagConstraints);

    jLabel26_Histotitel.setText("jLabel26");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    Histogramm_Panel.add(jLabel26_Histotitel, gridBagConstraints);

    Hauptfenster.addTab("Histogramme", null, Histogramm_Panel, "");

    Map_Panel.setPreferredSize(new java.awt.Dimension(594, 400));
    Map_Panel.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            Map_PanelComponentShown(evt);
        }
    });
    java.awt.GridBagLayout Map_PanelLayout = new java.awt.GridBagLayout();
    Map_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 };
    Map_PanelLayout.rowHeights = new int[] { 0, 5, 0, 5, 0 };
    Map_Panel.setLayout(Map_PanelLayout);

    Auswahl_Map.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Auswahl_MapActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Map_Panel.add(Auswahl_Map, gridBagConstraints);

    LoadGoogleEarth.setText("Google Earth");
    LoadGoogleEarth.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            LoadGoogleEarthActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 10;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Map_Panel.add(LoadGoogleEarth, gridBagConstraints);

    Kein_kmz_text.setText("Kein Log File");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Map_Panel.add(Kein_kmz_text, gridBagConstraints);

    Map_internal_Panel.setLayout(null);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 11;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Map_Panel.add(Map_internal_Panel, gridBagConstraints);

    jLabel_map_streckenlnge.setText("jLabel26");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 0;
    Map_Panel.add(jLabel_map_streckenlnge, gridBagConstraints);

    jLabel27.setText("GPS Lnge:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    Map_Panel.add(jLabel27, gridBagConstraints);

    Map_Type.setModel(
            new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    Map_Type.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Map_TypeActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Map_Panel.add(Map_Type, gridBagConstraints);

    Hauptfenster.addTab("Landkarte", Map_Panel);

    Jahresuebersicht_Panel.setPreferredSize(new java.awt.Dimension(688, 400));
    Jahresuebersicht_Panel.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            Jahresuebersicht_PanelComponentShown(evt);
        }
    });
    java.awt.GridBagLayout Jahresuebersicht_PanelLayout = new java.awt.GridBagLayout();
    Jahresuebersicht_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 };
    Jahresuebersicht_PanelLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
    Jahresuebersicht_Panel.setLayout(Jahresuebersicht_PanelLayout);

    Auswahl_bersicht.setMinimumSize(new java.awt.Dimension(200, 20));
    Auswahl_bersicht.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Auswahl_bersichtActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Jahresuebersicht_Panel.add(Auswahl_bersicht, gridBagConstraints);

    JahrVergleich.setMinimumSize(new java.awt.Dimension(200, 20));
    JahrVergleich.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            JahrVergleichActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Jahresuebersicht_Panel.add(JahrVergleich, gridBagConstraints);

    jLabel67.setText("Vergleich mit Jahr:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Jahresuebersicht_Panel.add(jLabel67, gridBagConstraints);

    jLabel70.setText("   Jahr:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Jahresuebersicht_Panel.add(jLabel70, gridBagConstraints);

    jRadioButton_jahresverlauf.setSelected(true);
    jRadioButton_jahresverlauf.setText("Jahresverlauf");
    jRadioButton_jahresverlauf.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButton_jahresverlaufActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Jahresuebersicht_Panel.add(jRadioButton_jahresverlauf, gridBagConstraints);

    jRadioButton_monatsbersicht.setText("Monatsbersicht");
    jRadioButton_monatsbersicht.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButton_monatsbersichtActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 10;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Jahresuebersicht_Panel.add(jRadioButton_monatsbersicht, gridBagConstraints);

    jPanel17bersichtchart
            .setLayout(new javax.swing.BoxLayout(jPanel17bersichtchart, javax.swing.BoxLayout.LINE_AXIS));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 11;
    gridBagConstraints.gridheight = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Jahresuebersicht_Panel.add(jPanel17bersichtchart, gridBagConstraints);

    Hauptfenster.addTab("Jahresbersicht", null, Jahresuebersicht_Panel, "");

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

    jMenuDatei.setLabel("Datei     ");

    jMenuOpen.setText("Rohdaten Importieren");
    jMenuOpen.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuOpenActionPerformed(evt);
        }
    });
    jMenuDatei.add(jMenuOpen);

    jMenuOpenall.setText("Alle Rohdaten Importieren");
    jMenuOpenall.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuOpenallActionPerformed(evt);
        }
    });
    jMenuDatei.add(jMenuOpenall);
    jMenuDatei.add(jSeparator1);

    jMenuLschen.setText("Lschen");
    jMenuLschen.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuLschenActionPerformed(evt);
        }
    });
    jMenuDatei.add(jMenuLschen);

    jMenuExit.setText("Beenden");
    jMenuExit.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuExitActionPerformed(evt);
        }
    });
    jMenuDatei.add(jMenuExit);

    jMenuHaupt.add(jMenuDatei);

    jMenu_V800_Laden.setText("Daten Empfangen     ");
    jMenu_V800_Laden.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jMenu_V800_LadenMouseClicked(evt);
        }
    });
    jMenuHaupt.add(jMenu_V800_Laden);

    jMenuTourEditor.setLabel("Tour Editor     ");
    jMenuTourEditor.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jMenuTourEditorMouseClicked(evt);
        }
    });
    jMenuHaupt.add(jMenuTourEditor);
    jMenuTourEditor.getAccessibleContext().setAccessibleName("Tour Editor");

    jMenuEinstellungen.setLabel("Einstellungen     ");
    jMenuEinstellungen.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jMenuEinstellungenMouseClicked(evt);
        }
    });
    jMenuHaupt.add(jMenuEinstellungen);

    jMenuHilfe.setText("Hilfe");
    jMenuHilfe.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jMenuHilfeMouseClicked(evt);
        }
    });
    jMenuHaupt.add(jMenuHilfe);

    setJMenuBar(jMenuHaupt);

    pack();
}

From source file:display.ANNFileFilter.java

License:asdf

Yanng() {
    JPanel toolBars;/*from ww  w . j  a  va2  s.  co  m*/
    JMenuBar menuBar;
    JToolBar utilBar, fileBar;
    JButton toJava, runner, trainer, modify, getTraininger, inputer, newwer, saver, saveAser, loader, helper;
    JMenu file;
    final JMenu util;
    JMenu help;

    ImageIcon IJava, IRun, ITrain, IModify, INew, ISave, ILoad, IGetTrainingSet, IGetInput, ISaveAs;

    //initialize main window
    mainWindow = new JFrame("YANNG - Yet Another Neural Network (simulator) Generator");
    mainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    mainWindow.setLayout(new BorderLayout());
    mainWindow.setSize(675, 525);
    mainWindow.setIconImage(new ImageIcon(ClassLoader.getSystemResource("display/icons/logo.png")).getImage());
    loadingImage = new ImageIcon(ClassLoader.getSystemResource("display/icons/loading.gif"));

    path = new Vector<String>();
    net = new Vector<NeuralNetwork>();
    oneNet = new Vector<JPanel>();
    tabPanel = new Vector<JPanel>();
    readOut = new Vector<JTextArea>();
    readOutLocale = new Vector<JScrollPane>();
    loadingBar = new Vector<JLabel>();
    title = new Vector<JLabel>();
    close = new Vector<JButton>();
    netName = new Vector<StringBuffer>();
    netKind = new Vector<StringBuffer>();

    resultsPane = new JTabbedPane();

    mainWindow.add(resultsPane);

    toolBars = new JPanel();
    toolBars.setLayout(new FlowLayout(FlowLayout.LEFT));

    //create utilities toolbar with 3 buttons
    utilBar = new JToolBar("Utilities");
    IRun = new ImageIcon(new ImageIcon(ClassLoader.getSystemResource("display/icons/running.png")).getImage()
            .getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH));
    ITrain = new ImageIcon(new ImageIcon(ClassLoader.getSystemResource("display/icons/training.png")).getImage()
            .getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH));
    IModify = new ImageIcon(new ImageIcon(ClassLoader.getSystemResource("display/icons/modifyNet.png"))
            .getImage().getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH));
    IGetTrainingSet = new ImageIcon(
            new ImageIcon(ClassLoader.getSystemResource("display/icons/trainingSet.png")).getImage()
                    .getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH));
    IGetInput = new ImageIcon(new ImageIcon(ClassLoader.getSystemResource("display/icons/input.png")).getImage()
            .getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH));
    //set the icons/tooltips for the utilitiy bar    
    runner = new JButton(IRun);
    runner.setToolTipText(
            "<html>Run  the  Current  Neural   Network<br>Once Through with the Current Input</html>");

    trainer = new JButton(ITrain);
    trainer.setToolTipText(
            "<html>Train the Network with the Current<br>Configuration  and  Training  Set</html>");

    modify = new JButton(IModify);
    modify.setToolTipText("<html>Modify the Network<br>for Fun and Profit</html>");

    getTraininger = new JButton(IGetTrainingSet);
    getTraininger.setToolTipText("Get Training Set from File");

    inputer = new JButton(IGetInput);
    inputer.setToolTipText("Get Input Set from File");

    utilBar.add(inputer);
    utilBar.add(runner);
    utilBar.add(getTraininger);
    utilBar.add(trainer);
    utilBar.add(modify);

    //create file toolbar
    fileBar = new JToolBar("file");
    ISaveAs = new ImageIcon(new ImageIcon(ClassLoader.getSystemResource("display/icons/saveAs.png")).getImage()
            .getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH));
    INew = new ImageIcon(new ImageIcon(ClassLoader.getSystemResource("display/icons/new.png")).getImage()
            .getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH));
    ISave = new ImageIcon(new ImageIcon(ClassLoader.getSystemResource("display/icons/save.png")).getImage()
            .getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH));
    ILoad = new ImageIcon(new ImageIcon(ClassLoader.getSystemResource("display/icons/load.png")).getImage()
            .getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH));
    IJava = new ImageIcon(new ImageIcon(ClassLoader.getSystemResource("display/icons/toJava.png")).getImage()
            .getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH));

    newwer = new JButton(INew);
    newwer.setToolTipText("Create New Neural Network");

    saver = new JButton(ISave);
    saver.setToolTipText("Save Current Network Configuration");

    saveAser = new JButton(ISaveAs);
    saveAser.setToolTipText("Save Network As");

    loader = new JButton(ILoad);
    loader.setToolTipText("Load Network Configuration from File");

    toJava = new JButton(IJava);
    toJava.setToolTipText("Export Network to Java Project");

    fileBar.add(newwer);
    fileBar.add(loader);
    fileBar.add(saver);
    fileBar.add(saveAser);
    fileBar.add(toJava);
    toolBars.add(fileBar);
    toolBars.add(utilBar);
    mainWindow.add(toolBars, BorderLayout.NORTH);

    //create a menubar with three menus on it
    menuBar = new JMenuBar();
    file = new JMenu("File");
    util = new JMenu("Utilities");
    help = new JMenu("Help");

    //add menu items for file menu
    load = new JMenuItem("Load Network Configuration");
    newNet = new JMenuItem("New Network");
    saveAs = new JMenuItem("Save Network As");
    save = new JMenuItem("Save Current Configuration");
    exportNet = new JMenuItem("Export Network to Java Project");
    exportOutput = new JMenuItem("Export Output to Text File");
    file.add(load);
    file.add(newNet);
    file.addSeparator();
    file.add(saveAs);
    file.add(save);
    file.addSeparator();
    file.add(exportNet);
    file.add(exportOutput);
    menuBar.add(file);

    //add menu items for utilities menu
    changeConfig = new JMenuItem("Modify Network Settings");
    getInput = new JMenuItem("Get Input From File");
    getTraining = new JMenuItem("Get Training Set From File");
    run = new JMenuItem("Run");
    train = new JMenuItem("Train");
    getColorMap = new JMenuItem("View Color Map");
    getColorMap.setVisible(false);
    util.add(changeConfig);
    util.addSeparator();
    util.add(getInput);
    util.add(getTraining);
    util.addSeparator();
    util.add(run);
    util.add(train);
    menuBar.add(util);

    //add menu items for help menu
    quickStart = new JMenuItem("Quick Start Guide");
    searchHelp = new JMenuItem("Programming with Yanng");
    about = new JMenuItem("License");
    links = new JMenuItem("<html>Links to Resources<br>about Neural Networks</html>");
    help.add(quickStart);
    help.addSeparator();
    help.add(searchHelp);
    help.addSeparator();
    help.add(about);
    help.addSeparator();
    help.add(links);
    menuBar.add(help);

    mainWindow.setJMenuBar(menuBar);

    //opens the quickstart guide
    quickStart.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            try {
                File myFile = new File(URLDecoder
                        .decode(ClassLoader.getSystemResource("ann/quick-start.pdf").getFile(), "UTF-8"));
                Desktop.getDesktop().open(myFile);
            } catch (IOException ex) {
                try {
                    Runtime.getRuntime().exec("xdg-open ./yanng/src/ann/quick-start.pdf");
                } catch (Exception e) {
                    JOptionPane.showMessageDialog(mainWindow,
                            "Your desktop is not supported by java,\ngo to yanng/src/ann/quick-start.pdf to view the technical manual.",
                            "Desktop not Supported", JOptionPane.ERROR_MESSAGE);
                }
            }
        }
    });

    links.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            try {
                File myFile = new File(
                        URLDecoder.decode(ClassLoader.getSystemResource("ann/links.pdf").getFile(), "UTF-8"));
                Desktop.getDesktop().open(myFile);
            } catch (IOException ex) {
                try {
                    Runtime.getRuntime().exec("xdg-open ./yanng/src/ann/links.pdf");
                } catch (Exception e) {
                    JOptionPane.showMessageDialog(mainWindow,
                            "Your desktop is not supported by java,\ngo to yanng/src/ann/links.pdf to view the technical manual.",
                            "Desktop not Supported", JOptionPane.ERROR_MESSAGE);
                }
            }
        }
    });

    //Displays license information
    about.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            JTextArea x = new JTextArea("Copyright [2015] [Sam Findler and Michael Scott]\n" + "\n"
                    + "Licensed under the Apache License, Version 2.0 (the \"License\");\n"
                    + "you may not use this file except in compliance with the License.\n"
                    + "You may obtain a copy of the License at\n" + "\n"
                    + "http://www.apache.org/licenses/LICENSE-2.0\n" + "\n"
                    + "Unless required by applicable law or agreed to in writing, software\n"
                    + "distributed under the License is distributed on an \"AS IS\" BASIS,\n"
                    + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
                    + "See the License for the specific language governing permissions and\n"
                    + "limitations under the License.");
            JDialog aboutDialog = new JDialog(mainWindow, "License", true);
            aboutDialog.setSize(500, 250);
            aboutDialog.setLayout(new FlowLayout());
            aboutDialog.add(x);
            x.setEditable(false);
            aboutDialog.setVisible(true);
        }
    });

    //opens the more technical user guide
    searchHelp.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            try {
                File myFile = new File(URLDecoder
                        .decode(ClassLoader.getSystemResource("ann/technical-manual.pdf").getFile(), "UTF-8"));
                Desktop.getDesktop().open(myFile);
            } catch (IOException ex) {
                try {
                    Runtime.getRuntime().exec("xdg-open ./yanng/src/ann/technical-manual.pdf");
                } catch (Exception e) {
                    JOptionPane.showMessageDialog(mainWindow,
                            "Your desktop is not supported by java,\ngo to yanng/src/ann/technical-manual.pdf to view the technical manual.",
                            "Desktop not Supported", JOptionPane.ERROR_MESSAGE);
                }
            }
        }
    });
    //class trains the neural network in the background while the loading bar displays, then prints out the output/connections listings/average error to the readOut pane
    class Trainer extends SwingWorker<NeuralNetwork, Object> {
        protected NeuralNetwork doInBackground() {
            net.get(resultsPane.getSelectedIndex()).trainNet();
            setProgress(1);
            return net.get(resultsPane.getSelectedIndex());
        }

        public void done() {
            if (resultsPane.getTabCount() != 0
                    && netKind.get(resultsPane.getSelectedIndex()).toString().equals("Feed Forward Network")) {
                if (Double.isNaN(net.get(resultsPane.getSelectedIndex()).getAverageError()))
                    JOptionPane.showMessageDialog(mainWindow, "Training Set Formatted Incorrectly",
                            "Formatting Error", JOptionPane.ERROR_MESSAGE);
                else {
                    printConnections();
                    readOut.get(resultsPane.getSelectedIndex()).append(
                            "Results of Training " + netName.get(resultsPane.getSelectedIndex()) + ":\n\n");
                    printOutput();
                    readOut.get(resultsPane.getSelectedIndex()).append("Average Error = "
                            + net.get(resultsPane.getSelectedIndex()).getAverageError() + "\n\n");
                    loadingBar.get(resultsPane.getSelectedIndex()).setVisible(false);
                    JOptionPane.showMessageDialog(mainWindow,
                            "<html>If the Input is not displaying as expected, chances are the input was inproperly formatted.<br>See help for more details<html>");
                }
            } else if (resultsPane.getTabCount() != 0
                    && netKind.get(resultsPane.getSelectedIndex()).toString().equals("Self-Organizing Map")) {
                readOut.get(resultsPane.getSelectedIndex()).append("\nUpdated Untrained Map:\n");
                printInitMap();
                loadingBar.get(resultsPane.getSelectedIndex()).setVisible(false);
                JOptionPane.showMessageDialog(mainWindow,
                        "<html>If the Input is not displaying as expected, chances are the input was inproperly formatted.<br>See help for more details<html>");
            }
        }

    }
    //starts the training class when train is pressed in the utilities menu
    train.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {

            if (resultsPane.getTabCount() != 0) {
                if (net.get(resultsPane.getSelectedIndex()).getTrainingSet() != null) {
                    loadingBar.get(resultsPane.getSelectedIndex()).setText(
                            "<html><font color = rgb(160,0,0)>Training</font> <font color = rgb(0,0,248)>net...</font></html>");
                    loadingBar.get(resultsPane.getSelectedIndex()).setVisible(true);
                    (thisTrainer = new Trainer()).execute();
                } else
                    JOptionPane.showMessageDialog(mainWindow, "No Input Set Specified", "Empty Signifier Error",
                            JOptionPane.ERROR_MESSAGE);
            }

            else
                JOptionPane.showMessageDialog(mainWindow, "Can't Train Nonexistent Neural Network",
                        "Existential Error", JOptionPane.ERROR_MESSAGE);
        }
    });
    //associates the toolbar button with the jump rope guy with the training button on the utilities menu
    trainer.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            for (ActionListener a : train.getActionListeners()) {
                a.actionPerformed(ae);
            }
        }
    });

    //runs through one set of inputs and prints the results to the readOut pane  
    run.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            if (resultsPane.getTabCount() != 0
                    && netKind.get(resultsPane.getSelectedIndex()).toString().equals("Feed Forward Network")) {
                if (net.get(resultsPane.getSelectedIndex()).getInputSet() != null) {
                    net.get(resultsPane.getSelectedIndex()).runNet();
                    if (Double.isNaN(net.get(resultsPane.getSelectedIndex()).getAverageError()))
                        JOptionPane.showMessageDialog(mainWindow, "Training Set Formatted Incorrectly",
                                "Formatting Error", JOptionPane.ERROR_MESSAGE);
                    else {
                        readOut.get(resultsPane.getSelectedIndex()).append("Results of Running through Network "
                                + netName.get(resultsPane.getSelectedIndex()) + ":\n\n");
                        printOutput();
                        System.out.println("Results:");
                        for (int i = 0; i < net.get(resultsPane.getSelectedIndex())
                                .getOutputSet().length; i++) {
                            System.out.println("\n   Output of Input Vector " + i + ":");
                            for (int j = 0; j < net.get(resultsPane.getSelectedIndex())
                                    .getOutputSet()[i].length; j++) {
                                System.out.println("      Output Node " + j + " = "
                                        + net.get(resultsPane.getSelectedIndex()).getOutputSet()[i][j]);
                            }
                        }
                        JOptionPane.showMessageDialog(mainWindow,
                                "<html>If the Input is not displaying as expected, chances are the input was inproperly formatted.<br>See help for more details<html>");
                    }
                } else
                    JOptionPane.showMessageDialog(mainWindow, "No Input Set Specified", "Empty Signifier Error",
                            JOptionPane.ERROR_MESSAGE);
            } else if (resultsPane.getTabCount() != 0
                    && netKind.get(resultsPane.getSelectedIndex()).toString().equals("Self-Organizing Map")) {
                if (net.get(resultsPane.getSelectedIndex()).getInputValues() != null) {
                    loadingBar.get(resultsPane.getSelectedIndex()).setText(
                            "<html><font color = rgb(160,0,0)>Training</font> <font color = rgb(0,0,248)>net...</font></html>");
                    loadingBar.get(resultsPane.getSelectedIndex()).setVisible(true);
                    (thisTrainer = new Trainer()).execute();
                } else
                    JOptionPane.showMessageDialog(mainWindow, "No Input Set Specified", "Empty Signifier Error",
                            JOptionPane.ERROR_MESSAGE);
            } else
                JOptionPane.showMessageDialog(mainWindow, "Can't Run Nonexistent Neural Network",
                        "Existential Error", JOptionPane.ERROR_MESSAGE);
        }
    });

    runner.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            for (ActionListener a : run.getActionListeners()) {
                a.actionPerformed(ae);
            }
        }
    });

    //the following code is for the getTraining button under utilities
    getTrainingSet = new JFileChooser();
    getTrainingSet.setFileFilter(new TrainingFileFilter());

    getTraining.addActionListener(new ActionListener() {
        //this method/class gets a training set (tsv/csv file) and parse it through the neural network.  Kind of test that the file is formatted correctly, but if the data is wrong, there isn't much it can do.
        public void actionPerformed(ActionEvent ae) {
            if (resultsPane.getTabCount() != 0
                    && netKind.get(resultsPane.getSelectedIndex()).toString().equals("Feed Forward Network")) {
                int result;
                result = getTrainingSet.showOpenDialog(mainWindow);
                if (result == JFileChooser.APPROVE_OPTION)
                    if (getTrainingSet.getSelectedFile().getName().endsWith(".csv")
                            || getTrainingSet.getSelectedFile().getName().endsWith(".tsv")
                            || getTrainingSet.getSelectedFile().getName().endsWith(".txt"))
                        if (net.get(resultsPane.getSelectedIndex())
                                .parseTrainingSet(getTrainingSet.getSelectedFile()))
                            JOptionPane.showMessageDialog(mainWindow,
                                    "<html>Method gives no Garuntee that this File is Formatted Correctly<br>(see help for more details)</html>",
                                    "Formatting Warning", JOptionPane.WARNING_MESSAGE);
                        else
                            JOptionPane.showMessageDialog(mainWindow,
                                    "File Mismatch with Network Configuration", "Correspondence Error",
                                    JOptionPane.ERROR_MESSAGE);
                    else {
                        JOptionPane.showMessageDialog(mainWindow, "Wrong File Type", "Category Error",
                                JOptionPane.ERROR_MESSAGE);
                    }
                else {
                    JOptionPane.showMessageDialog(mainWindow, "No File Selected", "Absence Warning",
                            JOptionPane.WARNING_MESSAGE);
                }
            } else if (resultsPane.getTabCount() != 0
                    && netKind.get(resultsPane.getSelectedIndex()).toString().equals("Self-Organizing Map")) {
                int result;
                result = getTrainingSet.showOpenDialog(mainWindow);
                if (result == JFileChooser.APPROVE_OPTION)
                    if (getTrainingSet.getSelectedFile().getName().endsWith(".csv")
                            || getTrainingSet.getSelectedFile().getName().endsWith(".tsv")
                            || getTrainingSet.getSelectedFile().getName().endsWith(".txt"))
                        if (net.get(resultsPane.getSelectedIndex())
                                .parseTrainingSet(getTrainingSet.getSelectedFile())) {
                            JOptionPane.showMessageDialog(mainWindow,
                                    "<html>Method gives no Garuntee that this File is Formatted Correctly<br>(see help for more details)</html>",
                                    "Formatting Warning", JOptionPane.WARNING_MESSAGE);
                            readOut.get(resultsPane.getSelectedIndex()).append("\nUpdated Untrained Map:\n");
                            printInitMap();
                        } else
                            JOptionPane.showMessageDialog(mainWindow,
                                    "File Mismatch with Network Configuration", "Correspondence Error",
                                    JOptionPane.ERROR_MESSAGE);
                    else {
                        JOptionPane.showMessageDialog(mainWindow, "Wrong File Type", "Category Error",
                                JOptionPane.ERROR_MESSAGE);
                    }
                else {
                    JOptionPane.showMessageDialog(mainWindow, "No File Selected", "Absence Warning",
                            JOptionPane.WARNING_MESSAGE);
                }
            } else {
                JOptionPane.showMessageDialog(mainWindow, "Can't Train Nonexistent Neural Network",
                        "Existential Error", JOptionPane.ERROR_MESSAGE);
            }
        }
    });

    getTraininger.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            for (ActionListener a : getTraining.getActionListeners()) {
                a.actionPerformed(ae);
            }
        }
    });

    //this ends the getTraining section of the code   

    getInput.addActionListener(new ActionListener() {
        //this method/class gets an input set (tsv/csv file) and parses it through the neural network.  Somewhat tests that the file is formatted correctly, but cannot give a garuntee.
        public void actionPerformed(ActionEvent ae) {
            if (resultsPane.getTabCount() != 0) {
                int result;
                result = getTrainingSet.showOpenDialog(mainWindow);
                if (result == JFileChooser.APPROVE_OPTION)
                    if (getTrainingSet.getSelectedFile().getName().endsWith(".csv")
                            || getTrainingSet.getSelectedFile().getName().endsWith(".tsv")
                            || getTrainingSet.getSelectedFile().getName().endsWith(".txt"))
                        if (net.get(resultsPane.getSelectedIndex())
                                .parseInputSet(getTrainingSet.getSelectedFile())) {
                            JOptionPane.showMessageDialog(mainWindow,
                                    "<html>Method gives no Garuntee that this File is Formatted Correctly<br>(see help for more details)</html>",
                                    "Formatting Warning", JOptionPane.WARNING_MESSAGE);
                            if (netKind.get(resultsPane.getSelectedIndex()).toString()
                                    .equals("Self-Organizing Map"))
                                printInitMap();
                        } else
                            JOptionPane.showMessageDialog(mainWindow,
                                    "File Mismatch with Network Configuration", "Correspondence Error",
                                    JOptionPane.ERROR_MESSAGE);
                    else
                        JOptionPane.showMessageDialog(mainWindow, "Wrong File Type", "Category Error",
                                JOptionPane.ERROR_MESSAGE);
                else
                    JOptionPane.showMessageDialog(mainWindow, "No File Selected", "Absence Warning",
                            JOptionPane.WARNING_MESSAGE);
            } else {
                JOptionPane.showMessageDialog(mainWindow, "Can't train nonexistent network",
                        "Existential Error", JOptionPane.ERROR_MESSAGE);
            }
        }
    });

    //opens and displays a color map of a SOM
    getColorMap.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            if (resultsPane.getTabCount() != 0) {
                if (netKind.get(resultsPane.getSelectedIndex()).toString().equals("Self-Organizing Map")) {
                    MapNode[][] map;

                    map = net.get(resultsPane.getSelectedIndex()).getMapArray();

                    int lValue = net.get(resultsPane.getSelectedIndex()).getLatticeValue();

                    int inputDimensions = net.get(resultsPane.getSelectedIndex()).getInputDimensions();

                    int[][] colorValues = new int[(lValue * lValue)][3];

                    double dMax = net.get(resultsPane.getSelectedIndex()).getDataMax();
                    double dMin = net.get(resultsPane.getSelectedIndex()).getDataMin();

                    int count = 0;

                    for (int i = 0; i < lValue; i++) {
                        for (int j = 0; j < lValue; j++) {
                            for (int k = 0; k < 3; k++) {
                                Vector tempVec = map[i][j].getWeights();
                                if (inputDimensions % 3 == 0) {
                                    colorValues[count][k] = Integer.parseInt(String.valueOf((Math.round(255
                                            * (Double.parseDouble(String.valueOf(tempVec.elementAt(k))))))));
                                }
                                if (inputDimensions % 3 == 1) {
                                    if (k == 0)
                                        colorValues[count][k] = 0;
                                    if (k == 1) {
                                        colorValues[count][k] = Integer
                                                .parseInt(String.valueOf((Math.round(255 * (Double
                                                        .parseDouble(String.valueOf(tempVec.elementAt(0))))))));
                                    }
                                    if (k == 2)
                                        colorValues[count][k] = 0;
                                }
                                if (inputDimensions % 3 == 2) {
                                    if (k == 2) {
                                        colorValues[count][k] = 0;
                                    } else
                                        colorValues[count][k] = Integer
                                                .parseInt(String.valueOf((Math.round(255 * (Double
                                                        .parseDouble(String.valueOf(tempVec.elementAt(k))))))));
                                }
                            }
                            count++;
                        }
                    }

                    JFrame frame = new JFrame();

                    frame.setTitle("Color Map");
                    frame.setPreferredSize(new Dimension(525, 500));
                    frame.add(new DrawPanel(colorValues, lValue));
                    frame.pack();
                    frame.setVisible(true);
                }

                else {
                    JOptionPane.showMessageDialog(mainWindow,
                            "This Feauture is only available for Self-Organizing Maps", "Not a Som Error",
                            JOptionPane.ERROR_MESSAGE);
                }
            } else {
                JOptionPane.showMessageDialog(mainWindow, "Network does not exist", "Existential Error",
                        JOptionPane.ERROR_MESSAGE);
            }
        }
    });

    inputer.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            for (ActionListener a : getInput.getActionListeners())
                a.actionPerformed(ae);
        }
    });

    getNet = new JFileChooser();
    getNet.setFileFilter(new ANNFileFilter());

    //saves the net, or opens save as dialog if net is not saved yet
    save.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            if (resultsPane.getTabCount() != 0) {
                if (!path.get(resultsPane.getSelectedIndex()).equals("")) {
                    net.get(resultsPane.getSelectedIndex())
                            .save(new File(path.get(resultsPane.getSelectedIndex())));
                }

                else {
                    for (ActionListener a : saveAs.getActionListeners()) {
                        a.actionPerformed(ae);
                    }
                }
            } else {
                JOptionPane.showMessageDialog(mainWindow, "Can't save NonExistent Neural Network",
                        "Existential Error", JOptionPane.ERROR_MESSAGE);
            }
        }
    });

    saver.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            for (ActionListener a : save.getActionListeners()) {
                a.actionPerformed(ae);
            }
        }
    });

    //opens dialog for saving the net
    saveAs.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            if (resultsPane.getTabCount() != 0) {
                int result, override;
                String tempName;
                result = getNet.showSaveDialog(mainWindow);
                if (result == JFileChooser.APPROVE_OPTION)
                    if ((new File(tempName = getNet.getSelectedFile().getName())).exists()
                            || (new File(tempName + ".ffn")).exists() || (new File(tempName + ".som")).exists()
                            || (new File(tempName + ".hfn")).exists()) {
                        override = JOptionPane.showConfirmDialog(mainWindow,
                                tempName + " already exists, do you want to override?", "File Exists",
                                JOptionPane.YES_NO_OPTION);
                        if (override == JOptionPane.YES_OPTION) {
                            if (net.get(resultsPane.getSelectedIndex()).save(getNet.getSelectedFile())) {
                                if (tempName.endsWith(".ffn") || tempName.endsWith(".som")) {
                                    netName.set(resultsPane.getSelectedIndex(), new StringBuffer(tempName));
                                    title.get(resultsPane.getSelectedIndex()).setText(tempName + " ");
                                } else if (netKind.get(resultsPane.getSelectedIndex()).toString()
                                        .equals("Feed Forward Network")) {
                                    netName.set(resultsPane.getSelectedIndex(),
                                            new StringBuffer(tempName + ".ffn"));
                                    title.get(resultsPane.getSelectedIndex()).setText(tempName + ".ffn ");
                                } else if (netKind.get(resultsPane.getSelectedIndex()).toString()
                                        .equals("Self-Organizing Map")) {
                                    netName.set(resultsPane.getSelectedIndex(),
                                            new StringBuffer(tempName + ".som"));
                                    title.get(resultsPane.getSelectedIndex()).setText(tempName + ".som ");
                                }
                                path.set(resultsPane.getSelectedIndex(), getNet.getSelectedFile().getPath());

                            } else
                                JOptionPane.showMessageDialog(mainWindow, "Could not save file", "File Error",
                                        JOptionPane.ERROR_MESSAGE);
                        }
                    } else {
                        if (net.get(resultsPane.getSelectedIndex()).save(getNet.getSelectedFile())) {
                            if (tempName.endsWith(".ffn") || tempName.endsWith(".som")
                                    || tempName.endsWith(".hfn")) {
                                netName.set(resultsPane.getSelectedIndex(), new StringBuffer(tempName));
                                title.get(resultsPane.getSelectedIndex()).setText(tempName + " ");
                            } else if (netKind.get(resultsPane.getSelectedIndex()).toString()
                                    .equals("Feed Forward Network")) {
                                netName.set(resultsPane.getSelectedIndex(),
                                        new StringBuffer(tempName + ".ffn"));
                                title.get(resultsPane.getSelectedIndex()).setText(tempName + ".ffn ");
                            } else if (netKind.get(resultsPane.getSelectedIndex()).toString()
                                    .equals("Self-Organizing Map")) {
                                netName.set(resultsPane.getSelectedIndex(),
                                        new StringBuffer(tempName + ".som"));
                                title.get(resultsPane.getSelectedIndex()).setText(tempName + ".som ");
                                path.set(resultsPane.getSelectedIndex(), getNet.getSelectedFile().getPath());
                            }
                        } else
                            JOptionPane.showMessageDialog(mainWindow, "Could not save file", "File Error",
                                    JOptionPane.ERROR_MESSAGE);
                    }
            } else {
                JOptionPane.showMessageDialog(mainWindow, "Nothing to Save", "Existetial Error",
                        JOptionPane.ERROR_MESSAGE);
            }
        }
    });

    saveAser.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            for (ActionListener a : saveAs.getActionListeners()) {
                a.actionPerformed(ae);
            }
        }
    });

    //loads a net
    load.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            int result;
            boolean test = true;
            String tempName;
            result = getNet.showOpenDialog(mainWindow);
            if (result == JFileChooser.APPROVE_OPTION) {
                tempName = getNet.getSelectedFile().getName();
                for (StringBuffer names : netName) {
                    if (names.toString().equals(tempName))
                        test = false;
                }
                if (test != false) {
                    //creates and sets the network configuration
                    if (tempName.endsWith(".ffn")) {
                        net.add(new FullyConnectedFeedForwardNet());
                    }
                    if (tempName.endsWith(".som")) {
                        net.add(new SelfOrganizingMap());
                    }
                    if (net.get(openNets).load(getNet.getSelectedFile()))
                        try {
                            //adds a close button to the top corner of each tab
                            title.add(new JLabel(tempName + " "));
                            close.add(new JButton("X"));
                            close.get(openNets).setActionCommand(tempName);
                            close.get(openNets)
                                    .setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
                            close.get(openNets).setMargin(new Insets(0, 0, 0, 0));
                            tabPanel.add(new JPanel(new GridBagLayout()));
                            tabPanel.get(openNets).setOpaque(false);
                            GridBagConstraints grid = new GridBagConstraints();
                            grid.fill = GridBagConstraints.HORIZONTAL;
                            grid.gridx = 0;
                            grid.gridy = 0;
                            grid.weightx = 1;
                            tabPanel.get(openNets).add(title.get(openNets), grid);
                            grid.gridx = 1;
                            grid.gridy = 0;
                            grid.weightx = 0;
                            tabPanel.get(openNets).add(close.get(openNets), grid);

                            //adds a loading bar
                            loadingBar.add(new JLabel("", loadingImage, SwingConstants.CENTER));
                            loadingBar.get(openNets).setHorizontalTextPosition(SwingConstants.LEFT);
                            loadingBar.get(openNets).setVisible(false);

                            path.add(getNet.getSelectedFile().getPath());

                            netKind.add(new StringBuffer(netType.getSelectedItem().toString()));
                            netName.add(new StringBuffer(tempName));
                            oneNet.add(new JPanel());
                            oneNet.get(openNets).setLayout(new GridBagLayout());
                            GridBagConstraints constraints = new GridBagConstraints();
                            constraints.fill = GridBagConstraints.BOTH;

                            //creates the readOut space and formats it so that the scroll pane/text changes size with the window, reserves space for the loading bar
                            readOut.add(new JTextArea(""));
                            readOutLocale.add(new JScrollPane(readOut.get(openNets)));
                            readOut.get(openNets).setEditable(false);
                            constraints.gridx = 0;
                            constraints.gridy = 0;
                            constraints.weighty = 1.0;
                            constraints.weightx = 1.0;
                            constraints.gridwidth = 2;
                            constraints.ipady = 90;
                            oneNet.get(openNets).add(readOutLocale.get(openNets), constraints);
                            constraints.fill = GridBagConstraints.HORIZONTAL;
                            constraints.gridx = 0;
                            constraints.gridy = 1;
                            constraints.ipady = 0;
                            constraints.gridwidth = 2;
                            constraints.anchor = GridBagConstraints.PAGE_END;

                            //add everythign to the tabbed pane
                            oneNet.get(openNets).add(loadingBar.get(openNets), constraints);
                            resultsPane.addTab(netName.get(openNets).toString(), oneNet.get(openNets));
                            resultsPane.setTabComponentAt(openNets, tabPanel.get(openNets));

                            //display the starting configuration of the network
                            readOut.get(openNets).append("Network: " + netName.get(openNets) + "\n\n");
                            resultsPane.setSelectedIndex(openNets++);
                            if (tempName.endsWith(".ffn"))
                                printConnections();
                            if (tempName.endsWith(".som")) {
                                readOut.get(resultsPane.getSelectedIndex()).append("\nUpdated Map:\n");
                                printInitMap();
                            }

                            //unfortunately difficult way that I made to add the close button functionality to close a tab
                            //it works, but there has to be a better way to do this
                            close.get(resultsPane.getSelectedIndex()).addActionListener(new ActionListener() {
                                public void actionPerformed(final ActionEvent ae) {
                                    int result;
                                    result = 0;
                                    for (StringBuffer names : netName) {
                                        if (ae.getActionCommand().equals(names.toString())) {
                                            result = JOptionPane.showConfirmDialog(createFFN,
                                                    "<html>Exiting Without Saving can Cause you to Lose your Progress<br>Are you sure you want to Continue?</html>",
                                                    "Close Network", JOptionPane.OK_CANCEL_OPTION);
                                            resultsPane.setSelectedIndex(netName.indexOf(names));
                                        }
                                    }
                                    if (result == JOptionPane.OK_OPTION) {
                                        net.remove(resultsPane.getSelectedIndex());
                                        oneNet.remove(resultsPane.getSelectedIndex());
                                        readOutLocale.remove(resultsPane.getSelectedIndex());
                                        readOut.remove(resultsPane.getSelectedIndex());
                                        loadingBar.remove(resultsPane.getSelectedIndex());
                                        tabPanel.remove(resultsPane.getSelectedIndex());
                                        title.remove(resultsPane.getSelectedIndex());
                                        close.remove(resultsPane.getSelectedIndex());
                                        netName.remove(resultsPane.getSelectedIndex());
                                        resultsPane.remove(resultsPane.getSelectedIndex());
                                        openNets--;
                                    }
                                }
                            });
                        } catch (Error e) {
                            JOptionPane.showMessageDialog(mainWindow, "File Formatted Incorrectly",
                                    "Formatting Error", JOptionPane.ERROR_MESSAGE);
                        }
                    else {
                        //if file was unable to load, remove the newly created neural network and display an error message
                        net.remove(openNets);
                        JOptionPane.showMessageDialog(mainWindow, "File Formatted Incorrectly",
                                "Formatting Error", JOptionPane.ERROR_MESSAGE);
                    }
                }

                else {
                    JOptionPane.showMessageDialog(mainWindow, "File Already Open", "Duality Error",
                            JOptionPane.ERROR_MESSAGE);
                }
            }
        }
    });

    //associates the load toolbar button with load from the file menu
    loader.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            for (ActionListener a : load.getActionListeners())
                a.actionPerformed(ae);
        }
    });

    textFileChooser = new JFileChooser();
    textFileChooser.setFileFilter(new TextFileFilter());

    //exports all text from readout to a text file
    exportOutput.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            if (resultsPane.getTabCount() != 0) {
                int result;
                result = textFileChooser.showSaveDialog(mainWindow);
                if (result == JFileChooser.APPROVE_OPTION) {
                    if (textFileChooser.getSelectedFile().exists()
                            || (new File(textFileChooser.getSelectedFile().getPath() + ".txt")).exists()) {
                        result = JOptionPane.showConfirmDialog(mainWindow,
                                "The File you have selected already Exists, do you want to Overwrite it?",
                                "File Exits", JOptionPane.YES_NO_OPTION);
                        if (result == JOptionPane.YES_OPTION) {
                            try {
                                if (textFileChooser.getSelectedFile().getPath().endsWith(".txt"))
                                    FileUtils.writeStringToFile(textFileChooser.getSelectedFile(),
                                            readOut.get(resultsPane.getSelectedIndex()).getText());
                                else
                                    FileUtils.writeStringToFile(
                                            new File(textFileChooser.getSelectedFile().getPath() + ".txt"),
                                            readOut.get(resultsPane.getSelectedIndex()).getText());
                                JOptionPane.showMessageDialog(mainWindow, "Succesfully wrote readout to file");
                            } catch (Exception e) {
                                JOptionPane.showMessageDialog(mainWindow, "Could not write to file", "Error",
                                        JOptionPane.ERROR_MESSAGE);
                            }
                        }
                    } else {
                        try {
                            if (textFileChooser.getSelectedFile().getPath().endsWith(".txt"))
                                FileUtils.writeStringToFile(textFileChooser.getSelectedFile(),
                                        readOut.get(resultsPane.getSelectedIndex()).getText());
                            else
                                FileUtils.writeStringToFile(
                                        new File(textFileChooser.getSelectedFile().getPath() + ".txt"),
                                        readOut.get(resultsPane.getSelectedIndex()).getText());
                            JOptionPane.showMessageDialog(mainWindow, "Succesfully wrote readout to file");
                        } catch (Exception e) {
                            JOptionPane.showMessageDialog(mainWindow, "Could not write to file", "Error",
                                    JOptionPane.ERROR_MESSAGE);
                        }
                    }
                }
            } else {
                JOptionPane.showMessageDialog(mainWindow, "Nothing to Export", "Existential Error",
                        JOptionPane.ERROR_MESSAGE);
            }
        }
    });

    projectFileChooser = new JFileChooser();
    projectFileChooser.setFileFilter(new ProjectFileFilter());

    //exports a neural network to a java/android project
    exportNet.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            int result, override, override2;
            String tempName;
            String templateFile;
            String directory;
            String path;
            if (resultsPane.getTabCount() != 0) {
                result = projectFileChooser.showSaveDialog(mainWindow);
                if (result == JFileChooser.APPROVE_OPTION) {
                    path = projectFileChooser.getSelectedFile().getPath();
                    directory = projectFileChooser.getSelectedFile().getPath().substring(0,
                            projectFileChooser.getSelectedFile().getPath().lastIndexOf(File.separator));
                    tempName = projectFileChooser.getSelectedFile().getName();
                    if (projectFileChooser.getSelectedFile().exists()
                            || (new File(directory, tempName + ".java")).exists()) {
                        override = JOptionPane.showConfirmDialog(mainWindow,
                                "Java Class File" + tempName + " already exists, do you want to overwrite it?",
                                "File Exists", JOptionPane.YES_NO_OPTION);
                        if (override == JOptionPane.YES_OPTION) {
                            try {
                                if (!(new File(directory, "ann")).exists())
                                    FileUtils.copyDirectoryToDirectory(
                                            FileUtils.toFile(ClassLoader.getSystemResource("ann/")),
                                            new File(directory));
                                if (netKind.get(resultsPane.getSelectedIndex()).toString()
                                        .equals("Feed Forward Network")) {
                                    templateFile = FileUtils.readFileToString(FileUtils
                                            .toFile(ClassLoader.getSystemResource("ann/FFNTemplate.txt")));
                                    templateFile = templateFile.replaceAll("yourpackagename",
                                            (new File(directory)).getName());
                                    templateFile = templateFile.replaceAll("YourProjectName",
                                            projectFileChooser.getSelectedFile().getName());
                                    if (netName.get(resultsPane.getSelectedIndex()).toString().endsWith(".ffn"))
                                        templateFile = templateFile.replaceAll("networkName",
                                                (new File(directory)).getName() + File.separator + netName
                                                        .get(resultsPane.getSelectedIndex()).toString());
                                    else
                                        templateFile = templateFile.replaceAll("networkName",
                                                (new File(directory)).getName() + File.separator
                                                        + netName.get(resultsPane.getSelectedIndex()).toString()
                                                        + ".ffn");
                                    if (path.indexOf('.') > 0) {
                                        FileUtils.writeStringToFile(
                                                new File(path.substring(0, path.lastIndexOf('.')) + ".java"),
                                                templateFile);
                                    } else
                                        FileUtils.writeStringToFile(new File(path + ".java"), templateFile);
                                    if ((new File(directory,
                                            (tempName = netName.get(resultsPane.getSelectedIndex())
                                                    .toString()))).exists()
                                            || (new File(directory, tempName + ".ffn")).exists()) {
                                        override2 = JOptionPane.showConfirmDialog(mainWindow,
                                                "Neural Network " + tempName
                                                        + " already exists, do you want to overwrite it?",
                                                "File Exists", JOptionPane.YES_NO_OPTION);
                                        if (override2 == JOptionPane.YES_OPTION)
                                            if (net.get(resultsPane.getSelectedIndex())
                                                    .save(new File(directory + File.separator + tempName))) {
                                                JOptionPane.showMessageDialog(mainWindow, "Network Exported to "
                                                        + (new File(directory)).getName());
                                            } else {
                                                JOptionPane.showMessageDialog(mainWindow,
                                                        "Couldn't save neural network to file, the rest of the project is exported",
                                                        "Write Error", JOptionPane.ERROR_MESSAGE);
                                            }
                                    } else {
                                        if (net.get(resultsPane.getSelectedIndex())
                                                .save(new File(directory + File.separator + tempName))) {
                                            JOptionPane.showMessageDialog(mainWindow,
                                                    "Network Exported to " + (new File(directory)).getName());
                                        } else {
                                            JOptionPane.showMessageDialog(mainWindow,
                                                    "Couldn't save neural network to file, the rest of the project is exported",
                                                    "Write Error", JOptionPane.ERROR_MESSAGE);
                                        }
                                    }
                                } else if (netKind.get(resultsPane.getSelectedIndex()).toString()
                                        .equals("Self-Organizing Map")) {
                                    templateFile = FileUtils.readFileToString(FileUtils
                                            .toFile(ClassLoader.getSystemResource("ann/SOMTemplate.txt")));
                                    templateFile = templateFile.replaceAll("yourpackagename",
                                            (new File(directory)).getName());
                                    templateFile = templateFile.replaceAll("YourProjectName",
                                            projectFileChooser.getSelectedFile().getName());
                                    if (netName.get(resultsPane.getSelectedIndex()).toString().endsWith(".som"))
                                        templateFile = templateFile.replaceAll("networkName",
                                                (new File(directory)).getName() + File.separator + netName
                                                        .get(resultsPane.getSelectedIndex()).toString());
                                    else
                                        templateFile = templateFile.replaceAll("networkName",
                                                (new File(directory)).getName() + File.separator
                                                        + netName.get(resultsPane.getSelectedIndex()).toString()
                                                        + ".som");
                                    if (path.indexOf('.') > 0) {
                                        FileUtils.writeStringToFile(
                                                new File(path.substring(0, path.lastIndexOf('.')) + ".java"),
                                                templateFile);
                                    } else
                                        FileUtils.writeStringToFile(new File(path + ".java"), templateFile);
                                    if ((new File(directory,
                                            (tempName = netName.get(resultsPane.getSelectedIndex())
                                                    .toString()))).exists()
                                            || (new File(directory, tempName + ".som")).exists()) {
                                        override2 = JOptionPane.showConfirmDialog(mainWindow,
                                                "Neural Network " + tempName
                                                        + " already exists, do you want to overwrite it?",
                                                "File Exists", JOptionPane.YES_NO_OPTION);
                                        if (override2 == JOptionPane.YES_OPTION)
                                            if (net.get(resultsPane.getSelectedIndex())
                                                    .save(new File(directory + File.separator + tempName))) {
                                                JOptionPane.showMessageDialog(mainWindow, "Network Exported to "
                                                        + (new File(directory)).getName());
                                            } else {
                                                JOptionPane.showMessageDialog(mainWindow,
                                                        "Couldn't save neural network to file, the rest of the project is exported",
                                                        "Write Error", JOptionPane.ERROR_MESSAGE);
                                            }
                                    } else {
                                        if (net.get(resultsPane.getSelectedIndex())
                                                .save(new File(directory + File.separator + tempName))) {
                                            JOptionPane.showMessageDialog(mainWindow,
                                                    "Network Exported to " + (new File(directory)).getName());
                                        } else {
                                            JOptionPane.showMessageDialog(mainWindow,
                                                    "Couldn't save neural network to file, the rest of the project is exported",
                                                    "Write Error", JOptionPane.ERROR_MESSAGE);
                                        }
                                    }
                                }
                            } catch (IOException io) {
                                System.out.println(io);
                            }

                        }
                    } else {
                        try {
                            if (!(new File(directory, "ann")).exists())
                                FileUtils.copyDirectoryToDirectory(
                                        FileUtils.toFile(ClassLoader.getSystemResource("ann/")),
                                        new File(directory));
                            if (netKind.get(resultsPane.getSelectedIndex()).toString()
                                    .equals("Feed Forward Network")) {
                                templateFile = FileUtils.readFileToString(
                                        FileUtils.toFile(ClassLoader.getSystemResource("ann/FFNTemplate.txt")));
                                templateFile = templateFile.replaceAll("yourpackagename",
                                        (new File(directory)).getName());
                                templateFile = templateFile.replaceAll("YourProjectName",
                                        projectFileChooser.getSelectedFile().getName());
                                if (netName.get(resultsPane.getSelectedIndex()).toString().endsWith(".ffn"))
                                    templateFile = templateFile.replaceAll("networkName",
                                            (new File(directory)).getName() + File.separator
                                                    + netName.get(resultsPane.getSelectedIndex()).toString());
                                else
                                    templateFile = templateFile.replaceAll("networkName",
                                            (new File(directory)).getName() + File.separator
                                                    + netName.get(resultsPane.getSelectedIndex()).toString()
                                                    + ".ffn");
                                if (path.indexOf('.') > 0) {
                                    FileUtils.writeStringToFile(
                                            new File(path.substring(0, path.lastIndexOf('.')) + ".java"),
                                            templateFile);
                                } else
                                    FileUtils.writeStringToFile(new File(path + ".java"), templateFile);
                                if ((new File(directory + File.separator
                                        + (tempName = netName.get(resultsPane.getSelectedIndex()).toString())))
                                                .exists()
                                        || (new File(directory + File.separator + tempName + ".ffn"))
                                                .exists()) {
                                    override2 = JOptionPane.showConfirmDialog(mainWindow,
                                            "Neural Network " + tempName
                                                    + " already exists, do you want to overwrite it?",
                                            "File Exists", JOptionPane.YES_NO_OPTION);
                                    if (override2 == JOptionPane.YES_OPTION)
                                        if (net.get(resultsPane.getSelectedIndex())
                                                .save(new File(directory + File.separator + tempName))) {
                                            JOptionPane.showMessageDialog(mainWindow,
                                                    "Network Exported to " + (new File(directory)).getName());
                                        } else {
                                            JOptionPane.showMessageDialog(mainWindow,
                                                    "Couldn't save neural network to file, the rest of the project is exported",
                                                    "Write Error", JOptionPane.ERROR_MESSAGE);
                                        }
                                } else {
                                    if (net.get(resultsPane.getSelectedIndex())
                                            .save(new File(directory + File.separator + tempName))) {
                                        JOptionPane.showMessageDialog(mainWindow,
                                                "Network Exported to " + (new File(directory)).getName());
                                    } else {
                                        JOptionPane.showMessageDialog(mainWindow,
                                                "Couldn't save neural network to file, the rest of the project is exported",
                                                "Write Error", JOptionPane.ERROR_MESSAGE);
                                    }
                                }
                            } else if (netKind.get(resultsPane.getSelectedIndex()).toString()
                                    .equals("Self-Organizing Map")) {
                                templateFile = FileUtils.readFileToString(
                                        FileUtils.toFile(ClassLoader.getSystemResource("ann/SOMTemplate.txt")));
                                templateFile = templateFile.replaceAll("yourpackagename",
                                        (new File(directory)).getName());
                                templateFile = templateFile.replaceAll("YourProjectName",
                                        projectFileChooser.getSelectedFile().getName());
                                if (netName.get(resultsPane.getSelectedIndex()).toString().endsWith(".som"))
                                    templateFile = templateFile.replaceAll("networkName",
                                            (new File(directory)).getName() + File.separator
                                                    + netName.get(resultsPane.getSelectedIndex()).toString());
                                else
                                    templateFile = templateFile.replaceAll("networkName",
                                            (new File(directory)).getName() + File.separator
                                                    + netName.get(resultsPane.getSelectedIndex()).toString()
                                                    + ".som");
                                if (path.indexOf('.') > 0) {
                                    FileUtils.writeStringToFile(
                                            new File(path.substring(0, path.lastIndexOf('.')) + ".java"),
                                            templateFile);
                                } else
                                    FileUtils.writeStringToFile(new File(path + ".java"), templateFile);
                                if ((new File(directory,
                                        (tempName = netName.get(resultsPane.getSelectedIndex()).toString())))
                                                .exists()
                                        || (new File(directory, tempName + ".som")).exists()) {
                                    override2 = JOptionPane.showConfirmDialog(mainWindow,
                                            "Neural Network " + tempName
                                                    + " already exists, do you want to overwrite it?",
                                            "File Exists", JOptionPane.YES_NO_OPTION);
                                    if (override2 == JOptionPane.YES_OPTION)
                                        if (net.get(resultsPane.getSelectedIndex())
                                                .save(new File(directory + File.separator + tempName))) {
                                            JOptionPane.showMessageDialog(mainWindow,
                                                    "Network Exported to " + (new File(directory)).getName());
                                        } else {
                                            JOptionPane.showMessageDialog(mainWindow,
                                                    "Couldn't save neural network to file, the rest of the project is exported",
                                                    "Write Error", JOptionPane.ERROR_MESSAGE);
                                        }
                                } else {
                                    if (net.get(resultsPane.getSelectedIndex())
                                            .save(new File(directory + File.separator + tempName))) {
                                        JOptionPane.showMessageDialog(mainWindow,
                                                "Network Exported to " + (new File(directory)).getName());
                                    } else {
                                        JOptionPane.showMessageDialog(mainWindow,
                                                "Couldn't save neural network to file, the rest of the project is exported",
                                                "Write Error", JOptionPane.ERROR_MESSAGE);
                                    }
                                }
                            }
                        } catch (IOException io) {
                            System.out.println(io);
                        }
                    }
                }
            } else {
                JOptionPane.showMessageDialog(mainWindow, "Can't Export NonExistent Neural Network",
                        "Existential Error", JOptionPane.ERROR_MESSAGE);
            }
        }
    });

    toJava.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            for (ActionListener a : exportNet.getActionListeners())
                a.actionPerformed(ae);
        }
    });

    //settings menu
    changeConfig.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            if (resultsPane.getTabCount() != 0
                    && netKind.get(resultsPane.getSelectedIndex()).toString().equals("Feed Forward Network")) {

                modifyFFNDialog = new JDialog(mainWindow, "Network Settings", true);
                modifyFFNDialog.setSize(500, 500);
                modifyFFNDialog.setLayout(new GridBagLayout());
                GridBagConstraints asdf = new GridBagConstraints();
                asdf.gridwidth = 5;
                asdf.gridheight = 1;
                asdf.gridx = 0;
                asdf.gridy = 0;
                asdf.fill = GridBagConstraints.HORIZONTAL;
                modifyFFNDialog.add(new JSeparator(), asdf);
                asdf.gridwidth = 5;
                asdf.gridheight = 15;
                asdf.weightx = 1.0;
                asdf.weighty = 1.0;
                asdf.gridx = 0;
                asdf.gridy = 1;
                asdf.fill = GridBagConstraints.BOTH;
                settings = new JTextArea();
                settings.setEditable(false);
                settings.setBorder(BorderFactory.createEtchedBorder());
                modifyFFNDialog.add(settings, asdf);
                asdf.fill = GridBagConstraints.HORIZONTAL;
                asdf.gridwidth = 5;
                asdf.gridheight = 1;
                asdf.gridx = 0;
                asdf.gridy = 16;
                modifyFFNDialog.add(new JSeparator(), asdf);
                asdf.gridwidth = 2;
                asdf.gridx = 7;
                asdf.gridy = 0;
                modifyFFNDialog.add(new JSeparator(), asdf);
                asdf.fill = GridBagConstraints.NONE;
                asdf.gridx = 7;
                asdf.gridy = 1;
                learningRateL = new JLabel("Set Learning Rate:");
                modifyFFNDialog.add(learningRateL, asdf);
                asdf.gridx = 7;
                asdf.gridy = 2;
                asdf.fill = GridBagConstraints.HORIZONTAL;
                learningRateTF = new JFormattedTextField(new NumberFormatter(NumberFormat.getNumberInstance()));
                learningRateTF.setText("");
                modifyFFNDialog.add(learningRateTF, asdf);
                asdf.fill = GridBagConstraints.NONE;
                asdf.gridx = 7;
                asdf.gridy = 3;
                momentumL = new JLabel("Set Momentum:");
                modifyFFNDialog.add(momentumL, asdf);
                asdf.gridx = 7;
                asdf.gridy = 4;
                asdf.fill = GridBagConstraints.HORIZONTAL;
                momentumTF = new JFormattedTextField(new NumberFormatter(NumberFormat.getNumberInstance()));
                momentumTF.setText("");
                modifyFFNDialog.add(momentumTF, asdf);
                asdf.gridx = 7;
                asdf.gridy = 5;
                modifyFFNDialog.add(new JSeparator(), asdf);
                asdf.fill = GridBagConstraints.NONE;
                /*asdf.gridwidth = 2;
                asdf.gridheight = 1;
                asdf.gridx = 7;
                asdf.gridy = 6;
                setNoise = new JLabel("Use Noise: ");
                modifyFFNDialog.add(setNoise, asdf);
                asdf.gridx = 7;
                asdf.gridy = 7;
                asdf.gridwidth = 1;
                noiseOn = new JRadioButton("yes");
                noiseOff = new JRadioButton("no");
                noiseGroup = new ButtonGroup();
                noiseGroup.add(noiseOn);
                noiseGroup.add(noiseOff);
                modifyFFNDialog.add(noiseOn,asdf);
                asdf.gridx = 8;
                asdf.gridy = 7;
                modifyFFNDialog.add(noiseOff,asdf);
                asdf.gridx = 7;
                asdf.gridy = 8;
                asdf.gridwidth = 2;
                setNoiseRange = new JButton("Set Noise Range");
                modifyFFNDialog.add(setNoiseRange,asdf);
                asdf.gridx = 7;
                asdf.gridy = 9;
                setNoiseTiming = new JButton("Set Noise Timing");
                modifyFFNDialog.add(setNoiseTiming,asdf);*/
                asdf.gridx = 7;
                asdf.gridy = 10;
                asdf.fill = GridBagConstraints.HORIZONTAL;
                modifyFFNDialog.add(new JSeparator(), asdf);
                asdf.fill = GridBagConstraints.NONE;
                asdf.gridx = 7;
                asdf.gridy = 11;
                setTrainingStyle = new JLabel("Set Training Style:");
                modifyFFNDialog.add(setTrainingStyle, asdf);
                asdf.gridx = 7;
                asdf.gridy = 12;
                asdf.gridwidth = 1;
                batchOn = new JRadioButton("batch");
                onlineOn = new JRadioButton("online");
                batchGroup = new ButtonGroup();
                batchGroup.add(batchOn);
                batchGroup.add(onlineOn);
                modifyFFNDialog.add(batchOn, asdf);
                asdf.gridx = 8;
                modifyFFNDialog.add(onlineOn, asdf);
                asdf.gridx = 7;
                asdf.gridy = 13;
                asdf.gridwidth = 2;
                asdf.fill = GridBagConstraints.HORIZONTAL;
                modifyFFNDialog.add(new JSeparator(), asdf);
                asdf.fill = GridBagConstraints.NONE;
                asdf.gridx = 7;
                asdf.gridy = 14;
                modifyBiases = new JButton("Modify Biases");
                modifyFFNDialog.add(modifyBiases, asdf);
                asdf.gridx = 7;
                asdf.gridy = 15;
                trainingCompletionButton = new JButton("Modify End Condition");
                modifyFFNDialog.add(trainingCompletionButton, asdf);
                asdf.fill = GridBagConstraints.HORIZONTAL;
                asdf.gridy = 16;
                modifyFFNDialog.add(new JSeparator(), asdf);
                asdf.fill = GridBagConstraints.NONE;
                asdf.gridwidth = 1;
                asdf.gridx = 3;
                asdf.gridy = 17;
                asdf.anchor = GridBagConstraints.PAGE_END;
                modifyFFN = new JButton("OK");
                modifyFFNDialog.add(modifyFFN, asdf);
                asdf.gridx = 7;
                cancelModifyFFN = new JButton("Cancel");
                modifyFFNDialog.add(cancelModifyFFN, asdf);
                settings.setText("");
                settings.append(
                        "\n\n\n\nLearning Rate: " + net.get(resultsPane.getSelectedIndex()).getLearningRate());
                settings.append("\n\nMomentum: " + net.get(resultsPane.getSelectedIndex()).getMomentum());
                settings.append("\n\nTraining Style: ");
                if (net.get(resultsPane.getSelectedIndex()).getBatchvOnline()) {
                    settings.append("batch");
                    batchOn.setSelected(true);
                } else {
                    settings.append("online");
                    onlineOn.setSelected(true);
                }
                settings.append("\n\nTraining End Condition: ");
                if (net.get(resultsPane.getSelectedIndex()).getUseIteration()) {
                    settings.append("Iterative");
                    settings.append(
                            "\n\nIterations: " + net.get(resultsPane.getSelectedIndex()).getIterations());
                } else {
                    settings.append("Ideal Error");
                    settings.append(
                            "\n\nIdeal Error: " + net.get(resultsPane.getSelectedIndex()).getIdealError());
                }

                //expiremental feature, needs work on the back end to be properly implemented   
                modifyBiases.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        JButton addBiases, removeBiases;

                        biasesDialog = new JDialog(modifyFFNDialog, "Set Biases");
                        biasesDialog.setSize(200, 46);
                        biasesDialog.setLayout(new GridLayout(2, 1));
                        addBiases = new JButton("Add Bias");
                        removeBiases = new JButton("Remove Bias");

                        biasesDialog.add(addBiases);
                        biasesDialog.add(removeBiases);

                        addBiases.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent ae) {
                                JLabel howManyBiasLayersLabel, whatBiasNodeLabel, whatBiasValueLabel;
                                final JFormattedTextField howManyBiasLayers, whatBiasNode, whatBiasValue;
                                JButton addBiasOK, addBiasCancel;
                                biasesDialog.setVisible(false);
                                addBiasDialog = new JDialog(modifyFFNDialog, "Add Bias");
                                addBiasDialog.setSize(756, 90);
                                addBiasDialog.setLayout(new GridLayout(4, 2));
                                howManyBiasLayersLabel = new JLabel("What Layer will get the Bias?");
                                howManyBiasLayers = new JFormattedTextField(
                                        new NumberFormatter(NumberFormat.getIntegerInstance()));
                                whatBiasNodeLabel = new JLabel("Which Node will get the Bias?");
                                whatBiasNode = new JFormattedTextField(
                                        new NumberFormatter(NumberFormat.getIntegerInstance()));
                                whatBiasValueLabel = new JLabel("What Value will the Bias have?");
                                whatBiasValue = new JFormattedTextField(
                                        new NumberFormatter(NumberFormat.getInstance()));
                                addBiasOK = new JButton("OK");
                                addBiasCancel = new JButton("Cancel");
                                addBiasDialog.add(howManyBiasLayersLabel);
                                addBiasDialog.add(howManyBiasLayers);
                                addBiasDialog.add(whatBiasNodeLabel);
                                addBiasDialog.add(whatBiasNode);
                                addBiasDialog.add(whatBiasValueLabel);
                                addBiasDialog.add(whatBiasValue);
                                addBiasDialog.add(addBiasOK);
                                addBiasDialog.add(addBiasCancel);

                                addBiasOK.addActionListener(new ActionListener() {
                                    public void actionPerformed(ActionEvent ae) {
                                        if (!howManyBiasLayers.getText().equals("")
                                                && !whatBiasNode.getText().equals("")
                                                && !whatBiasValue.getText().equals("")) {
                                            addBiasDialog.setVisible(false);
                                            if (net.get(resultsPane.getSelectedIndex()).addBias(
                                                    Integer.parseInt(howManyBiasLayers.getText()) - 1,
                                                    Integer.parseInt(whatBiasNode.getText()) - 1,
                                                    Double.parseDouble(whatBiasValue.getText()))) {
                                            } else {
                                                JOptionPane.showMessageDialog(modifyFFNDialog,
                                                        "Existential Error", "Invalid Node for Bias",
                                                        JOptionPane.ERROR_MESSAGE);
                                            }
                                        } else {
                                            JOptionPane.showMessageDialog(modifyFFNDialog, "Form Error",
                                                    "Form not completed", JOptionPane.ERROR_MESSAGE);
                                        }
                                    }
                                });
                                addBiasCancel.addActionListener(new ActionListener() {
                                    public void actionPerformed(ActionEvent ae) {
                                        addBiasDialog.setVisible(false);
                                    }
                                });

                                addBiasDialog.setVisible(true);
                            }
                        });

                        removeBiases.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent ae) {
                                JLabel howManyBiasLayersLabel, whatBiasNodeLabel;
                                final JFormattedTextField howManyBiasLayers, whatBiasNode;
                                JButton addBiasOK, addBiasCancel;
                                biasesDialog.setVisible(false);
                                removeBiasDialog = new JDialog(modifyFFNDialog, "Remove Bias");
                                removeBiasDialog.setSize(756, 90);
                                removeBiasDialog.setLayout(new GridLayout(3, 2));
                                howManyBiasLayersLabel = new JLabel("What Layer will lose the Bias?");
                                howManyBiasLayers = new JFormattedTextField(
                                        new NumberFormatter(NumberFormat.getIntegerInstance()));
                                whatBiasNodeLabel = new JLabel("Which Node will get the Bias?");
                                whatBiasNode = new JFormattedTextField(
                                        new NumberFormatter(NumberFormat.getIntegerInstance()));
                                addBiasOK = new JButton("OK");
                                addBiasCancel = new JButton("Cancel");
                                removeBiasDialog.add(howManyBiasLayersLabel);
                                removeBiasDialog.add(howManyBiasLayers);
                                removeBiasDialog.add(whatBiasNodeLabel);
                                removeBiasDialog.add(whatBiasNode);
                                removeBiasDialog.add(addBiasOK);
                                removeBiasDialog.add(addBiasCancel);

                                addBiasOK.addActionListener(new ActionListener() {
                                    public void actionPerformed(ActionEvent ae) {
                                        if (!howManyBiasLayers.getText().equals("")
                                                && !whatBiasNode.getText().equals("")) {
                                            addBiasDialog.setVisible(false);
                                            if (net.get(resultsPane.getSelectedIndex()).removeBias(
                                                    Integer.parseInt(howManyBiasLayers.getText()) - 1,
                                                    Integer.parseInt(whatBiasNode.getText()) - 1)) {
                                            } else {
                                                JOptionPane.showMessageDialog(modifyFFNDialog,
                                                        "Existential Error", "Invalid Node for Bias",
                                                        JOptionPane.ERROR_MESSAGE);
                                            }
                                        } else {
                                            JOptionPane.showMessageDialog(modifyFFNDialog, "Form Error",
                                                    "Form not completed", JOptionPane.ERROR_MESSAGE);
                                        }
                                    }
                                });
                                addBiasCancel.addActionListener(new ActionListener() {
                                    public void actionPerformed(ActionEvent ae) {
                                        addBiasDialog.setVisible(false);
                                    }
                                });

                                removeBiasDialog.setVisible(true);
                            }
                        });

                        biasesDialog.setVisible(true);

                    }
                });

                trainingCompletionButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        final JDialog iterationsDialog;
                        JLabel numberOfIterationsLabel;
                        final JFormattedTextField numberOfIterations;
                        JButton iterationsOK, iterationsCancel;
                        iterationsDialog = new JDialog(modifyFFNDialog, "Set Iterations");
                        iterationsDialog.setSize(765, 75);
                        iterationsDialog.setLayout(new GridLayout(2, 2));
                        numberOfIterationsLabel = new JLabel("How Many Iterations do you want to Train?");
                        numberOfIterations = new JFormattedTextField(
                                new NumberFormatter(NumberFormat.getIntegerInstance()));
                        iterationsOK = new JButton("OK");
                        iterationsCancel = new JButton("Cancel");
                        iterationsDialog.add(numberOfIterationsLabel);
                        iterationsDialog.add(numberOfIterations);
                        iterationsDialog.add(iterationsOK);
                        iterationsDialog.add(iterationsCancel);
                        iterationsOK.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent ae) {
                                if (!numberOfIterations.getText().equals("")) {
                                    iterationsDialog.setVisible(false);
                                    if (net.get(resultsPane.getSelectedIndex())
                                            .setIterations(Integer.parseInt(numberOfIterations.getText()))) {
                                        settings.setText("");
                                        settings.append("\n\n\n\nLearning Rate: "
                                                + net.get(resultsPane.getSelectedIndex()).getLearningRate());
                                        settings.append("\n\nMomentum: "
                                                + net.get(resultsPane.getSelectedIndex()).getMomentum());
                                        settings.append("\n\nTraining Style: ");
                                        if (net.get(resultsPane.getSelectedIndex()).getBatchvOnline()) {
                                            settings.append("batch");
                                            batchOn.setSelected(true);
                                        } else {
                                            settings.append("online");
                                            onlineOn.setSelected(true);
                                        }
                                        settings.append("\n\nTraining End Condition: ");
                                        if (net.get(resultsPane.getSelectedIndex()).getUseIteration()) {
                                            settings.append("Iterative");
                                            settings.append("\n\nIterations: "
                                                    + net.get(resultsPane.getSelectedIndex()).getIterations());
                                        } else {
                                            settings.append("Ideal Error");
                                            settings.append("\n\nIdeal Error: "
                                                    + net.get(resultsPane.getSelectedIndex()).getIdealError());
                                        }
                                        modifyFFNDialog.setVisible(true);
                                    } else {
                                        JOptionPane.showMessageDialog(modifyFFNDialog,
                                                "Invalid Number of Iterations", "Math Error",
                                                JOptionPane.ERROR_MESSAGE);
                                    }
                                } else {
                                    JOptionPane.showMessageDialog(iterationsDialog, "Field not filled out",
                                            "Form Error", JOptionPane.ERROR_MESSAGE);
                                }
                            }
                        });
                        iterationsCancel.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent ae) {
                                iterationsDialog.setVisible(false);
                            }
                        });
                        iterationsDialog.setVisible(true);
                    }
                });

                modifyFFN.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        if (!learningRateTF.getText().equals("")) {
                            net.get(resultsPane.getSelectedIndex())
                                    .setLearningRate(Double.parseDouble(learningRateTF.getText()));
                            learningRateTF.setText("");
                        }
                        if (!momentumTF.getText().equals("")) {
                            net.get(resultsPane.getSelectedIndex())
                                    .setMomentum(Double.parseDouble(momentumTF.getText()));
                            momentumTF.setText("");
                        }
                        if (batchOn.isSelected()) {
                            net.get(resultsPane.getSelectedIndex()).setBatchvOnline(true);
                        } else {
                            net.get(resultsPane.getSelectedIndex()).setBatchvOnline(false);
                        }

                        modifyFFNDialog.setVisible(false);
                    }
                });

                learningRateTF.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        if (learningRateTF.getText() != "") {
                            net.get(resultsPane.getSelectedIndex())
                                    .setLearningRate(Double.parseDouble(learningRateTF.getText()));
                        }
                        settings.setText("");
                        settings.append("\n\n\n\nLearning Rate: "
                                + net.get(resultsPane.getSelectedIndex()).getLearningRate());
                        settings.append(
                                "\n\nMomentum: " + net.get(resultsPane.getSelectedIndex()).getMomentum());
                        settings.append("\n\nTraining Style: ");

                        if (net.get(resultsPane.getSelectedIndex()).getBatchvOnline()) {
                            settings.append("batch");
                            batchOn.setSelected(true);
                        } else {
                            settings.append("online");
                            onlineOn.setSelected(true);
                        }
                        settings.append("\n\nTraining End Condition: ");
                        if (net.get(resultsPane.getSelectedIndex()).getUseIteration()) {
                            settings.append("Iterative");
                            settings.append("\n\nIterations: "
                                    + net.get(resultsPane.getSelectedIndex()).getIterations());
                        } else {
                            settings.append("Ideal Error");
                            settings.append("\n\nIdeal Error: "
                                    + net.get(resultsPane.getSelectedIndex()).getIdealError());
                        }
                        modifyFFNDialog.setVisible(true);
                    }
                });
                momentumTF.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        if (momentumTF.getText() != "") {
                            net.get(resultsPane.getSelectedIndex())
                                    .setMomentum(Double.parseDouble(momentumTF.getText()));
                        }
                        settings.setText("");
                        settings.append("\n\n\n\nLearning Rate: "
                                + net.get(resultsPane.getSelectedIndex()).getLearningRate());
                        settings.append(
                                "\n\nMomentum: " + net.get(resultsPane.getSelectedIndex()).getMomentum());
                        settings.append("\n\nTraining Style: ");
                        if (net.get(resultsPane.getSelectedIndex()).getBatchvOnline()) {
                            settings.append("batch");
                            batchOn.setSelected(true);
                        } else {
                            settings.append("online");
                            onlineOn.setSelected(true);
                        }
                        settings.append("\n\nTraining End Condition: ");
                        if (net.get(resultsPane.getSelectedIndex()).getUseIteration()) {
                            settings.append("Iterative");
                            settings.append("\n\nIterations: "
                                    + net.get(resultsPane.getSelectedIndex()).getIterations());
                        } else {
                            settings.append("Ideal Error");
                            settings.append("\n\nIdeal Error: "
                                    + net.get(resultsPane.getSelectedIndex()).getIdealError());
                        }
                        modifyFFNDialog.setVisible(true);
                    }
                });
                cancelModifyFFN.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        modifyFFNDialog.setVisible(false);
                    }
                });
                modifyFFNDialog.setVisible(true);
            }
            if (resultsPane.getTabCount() != 0
                    && netKind.get(resultsPane.getSelectedIndex()).toString().equals("Self-Organizing Map")) {
                modifySOMDialog = new JDialog(mainWindow, "Network Settings", true);
                modifySOMDialog.setSize(500, 400);
                modifySOMDialog.setLayout(new GridBagLayout());
                GridBagConstraints asdf = new GridBagConstraints();
                asdf.gridwidth = 5;
                asdf.gridheight = 1;
                asdf.gridx = 0;
                asdf.gridy = 0;
                asdf.fill = GridBagConstraints.HORIZONTAL;
                modifySOMDialog.add(new JSeparator(), asdf);
                asdf.gridwidth = 5;
                asdf.gridheight = 15;
                asdf.weightx = 1.0;
                asdf.weighty = 1.0;
                asdf.gridx = 0;
                asdf.gridy = 1;
                asdf.fill = GridBagConstraints.BOTH;
                settings = new JTextArea();
                settings.setEditable(false);
                settings.setBorder(BorderFactory.createEtchedBorder());
                modifySOMDialog.add(settings, asdf);
                asdf.fill = GridBagConstraints.HORIZONTAL;
                asdf.gridwidth = 5;
                asdf.gridheight = 1;
                asdf.gridx = 0;
                asdf.gridy = 16;
                modifySOMDialog.add(new JSeparator(), asdf);
                asdf.gridwidth = 2;
                asdf.gridx = 7;
                asdf.gridy = 0;
                modifySOMDialog.add(new JSeparator(), asdf);
                asdf.fill = GridBagConstraints.NONE;
                asdf.gridx = 7;
                asdf.gridy = 1;
                mIterationL = new JLabel("Set Number of Iterations:");
                modifySOMDialog.add(mIterationL, asdf);
                asdf.gridx = 7;
                asdf.gridy = 2;
                asdf.fill = GridBagConstraints.HORIZONTAL;
                mIterationTF = new JFormattedTextField(new NumberFormatter(NumberFormat.getIntegerInstance()));
                mIterationTF.setText("");
                modifySOMDialog.add(mIterationTF, asdf);
                asdf.fill = GridBagConstraints.NONE;
                asdf.gridx = 7;
                asdf.gridy = 3;
                mLRL = new JLabel("Set Learning Rate (0-1):");
                modifySOMDialog.add(mLRL, asdf);
                asdf.gridx = 7;
                asdf.gridy = 4;
                asdf.fill = GridBagConstraints.HORIZONTAL;
                mLRTF = new JFormattedTextField(new NumberFormatter(NumberFormat.getNumberInstance()));
                mLRTF.setText("");
                modifySOMDialog.add(mLRTF, asdf);
                asdf.fill = GridBagConstraints.NONE;
                asdf.gridx = 7;
                asdf.gridy = 5;
                mMaxL = new JLabel("Set Data Maximum:");
                modifySOMDialog.add(mMaxL, asdf);
                asdf.gridx = 7;
                asdf.gridy = 6;
                asdf.fill = GridBagConstraints.HORIZONTAL;
                mMaxTF = new JFormattedTextField(new NumberFormatter(NumberFormat.getNumberInstance()));
                mMaxTF.setText("");
                modifySOMDialog.add(mMaxTF, asdf);
                asdf.fill = GridBagConstraints.NONE;
                asdf.gridx = 7;
                asdf.gridy = 7;
                mMinL = new JLabel("Set Data Minimum:");
                modifySOMDialog.add(mMinL, asdf);
                asdf.gridx = 7;
                asdf.gridy = 8;
                asdf.fill = GridBagConstraints.HORIZONTAL;
                mMinTF = new JFormattedTextField(new NumberFormatter(NumberFormat.getNumberInstance()));
                mMinTF.setText("");
                modifySOMDialog.add(mMinTF, asdf);
                asdf.fill = GridBagConstraints.HORIZONTAL;
                asdf.gridy = 16;
                modifySOMDialog.add(new JSeparator(), asdf);
                asdf.fill = GridBagConstraints.NONE;
                asdf.gridwidth = 1;
                asdf.gridx = 3;
                asdf.gridy = 17;
                asdf.anchor = GridBagConstraints.PAGE_END;
                modifySOM = new JButton("OK");
                modifySOMDialog.add(modifySOM, asdf);
                asdf.gridx = 7;
                cancelModifySOM = new JButton("Cancel");
                modifySOMDialog.add(cancelModifySOM, asdf);
                settings.setText("");
                settings.append("\n\nNumber of Iterations: "
                        + net.get(resultsPane.getSelectedIndex()).getNumIterations());
                settings.append(
                        "\n\nLearning Rate: " + net.get(resultsPane.getSelectedIndex()).getLearningRate());
                settings.append("\n\nData Maximum: " + net.get(resultsPane.getSelectedIndex()).getDataMax());
                settings.append("\n\nData Minimum: " + net.get(resultsPane.getSelectedIndex()).getDataMin());

                mIterationTF.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        if (mIterationTF.getText() != "") {
                            net.get(resultsPane.getSelectedIndex())
                                    .setNumIterations(Integer.parseInt(mIterationTF.getText()));

                            settings.setText("");
                            settings.append("\n\nNumber of Iterations: "
                                    + net.get(resultsPane.getSelectedIndex()).getNumIterations());
                            settings.append("\n\nLearning Rate: "
                                    + net.get(resultsPane.getSelectedIndex()).getLearningRate());
                            settings.append("\n\nData Maximum: "
                                    + net.get(resultsPane.getSelectedIndex()).getDataMax());
                            settings.append("\n\nData Minimum: "
                                    + net.get(resultsPane.getSelectedIndex()).getDataMin());
                        }
                    }
                });

                mLRTF.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        if ((mLRTF.getText() != "") && ((Double.parseDouble(mLRTF.getText())) <= 1.0)) {
                            net.get(resultsPane.getSelectedIndex())
                                    .setLearningRate(Double.parseDouble(mLRTF.getText()));

                            settings.setText("");
                            settings.append("\n\nNumber of Iterations: "
                                    + net.get(resultsPane.getSelectedIndex()).getNumIterations());
                            settings.append("\n\nLearning Rate: "
                                    + net.get(resultsPane.getSelectedIndex()).getLearningRate());
                            settings.append("\n\nData Maximum: "
                                    + net.get(resultsPane.getSelectedIndex()).getDataMax());
                            settings.append("\n\nData Minimum: "
                                    + net.get(resultsPane.getSelectedIndex()).getDataMin());
                        } else {
                            JOptionPane.showMessageDialog(mLRTF, "Pick a number from 0 - 1", "Incorrect Value",
                                    JOptionPane.ERROR_MESSAGE);
                            mLRTF.setText("");
                        }
                    }
                });

                mMaxTF.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        if ((mMaxTF.getText() != "") && (((Double.parseDouble(mMaxTF.getText())) > net
                                .get(resultsPane.getSelectedIndex()).getDataMin()))) {
                            net.get(resultsPane.getSelectedIndex())
                                    .setDataMax(Double.parseDouble(mMaxTF.getText()));

                            settings.setText("");
                            settings.append("\n\nNumber of Iterations: "
                                    + net.get(resultsPane.getSelectedIndex()).getNumIterations());
                            settings.append("\n\nLearning Rate: "
                                    + net.get(resultsPane.getSelectedIndex()).getLearningRate());
                            settings.append("\n\nData Maximum: "
                                    + net.get(resultsPane.getSelectedIndex()).getDataMax());
                            settings.append("\n\nData Minimum: "
                                    + net.get(resultsPane.getSelectedIndex()).getDataMin());
                        } else {
                            JOptionPane.showMessageDialog(mMaxTF, "Max value must be greater than Min value",
                                    "Incorrect Value", JOptionPane.ERROR_MESSAGE);
                            mMaxTF.setText("");
                        }
                    }
                });

                mMinTF.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        if ((mMinTF.getText() != "") && ((Double.parseDouble(mMinTF.getText())) < net
                                .get(resultsPane.getSelectedIndex()).getDataMax())) {
                            net.get(resultsPane.getSelectedIndex())
                                    .setDataMin(Double.parseDouble(mMinTF.getText()));

                            settings.setText("");
                            settings.append("\n\nNumber of Iterations: "
                                    + net.get(resultsPane.getSelectedIndex()).getNumIterations());
                            settings.append("\n\nLearning Rate: "
                                    + net.get(resultsPane.getSelectedIndex()).getLearningRate());
                            settings.append("\n\nData Maximum: "
                                    + net.get(resultsPane.getSelectedIndex()).getDataMax());
                            settings.append("\n\nData Minimum: "
                                    + net.get(resultsPane.getSelectedIndex()).getDataMin());
                        } else {
                            JOptionPane.showMessageDialog(mMinTF, "Min value must be less than Max value",
                                    "Incorrect Value", JOptionPane.ERROR_MESSAGE);
                            mMinTF.setText("");
                        }
                    }
                });

                modifySOM.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        boolean error = false;
                        if (!("".equals(mIterationTF.getText()))) {
                            net.get(resultsPane.getSelectedIndex())
                                    .setNumIterations(Integer.parseInt(mIterationTF.getText()));
                        }
                        if (!("".equals(mLRTF.getText()))) {
                            if ((Double.parseDouble(mLRTF.getText())) > 1.0) {
                                error = true;
                                mLRTF.setText("");
                            } else
                                net.get(resultsPane.getSelectedIndex())
                                        .setLearningRate(Double.parseDouble(mLRTF.getText()));
                        }
                        if (!("".equals(mMaxTF.getText()))) {
                            if (((Double.parseDouble(mMaxTF.getText())) < net
                                    .get(resultsPane.getSelectedIndex()).getDataMin())) {
                                error = true;
                                mMaxTF.setText("");
                            } else
                                net.get(resultsPane.getSelectedIndex())
                                        .setDataMax(Double.parseDouble(mMaxTF.getText()));
                        }
                        if (!("".equals(mMinTF.getText()))) {
                            if ((Double.parseDouble(mMinTF.getText())) > net.get(resultsPane.getSelectedIndex())
                                    .getDataMax()) {
                                error = true;
                                mMinTF.setText("");
                            } else
                                net.get(resultsPane.getSelectedIndex())
                                        .setDataMin(Double.parseDouble(mMinTF.getText()));
                        }

                        if (error == true) {
                            JOptionPane.showMessageDialog(modifySOMDialog,
                                    "One or more fields have incorrect values", "Incorrect Value",
                                    JOptionPane.ERROR_MESSAGE);
                        } else {
                            modifySOMDialog.setVisible(false);
                            readOut.get(resultsPane.getSelectedIndex()).append("\nUpdated Map:\n");
                            printInitMap();
                        }

                    }
                });

                cancelModifySOM.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        modifySOMDialog.setVisible(false);
                    }
                });

                modifySOMDialog.setVisible(true);
            }
        }

    });

    modify.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            for (ActionListener a : changeConfig.getActionListeners()) {
                a.actionPerformed(ae);
            }
        }
    });

    //The following code is for the newNet button under file:

    //create a dialog to be activated when "New Network" is pressed in the file menu
    newDialog = new JDialog(mainWindow, "New Network", true);
    newDialog.setSize(375, 100);
    newDialog.setLayout(new GridLayout(3, 2)); //going to change the layout to GridBagLayout for better customization

    name = new JLabel("Network Name:");
    newName = new JTextField(10);
    type = new JLabel("Type of Network:");
    netTypes = new String[] { "Feed Forward Network", "Self-Organizing Map" };
    netType = new JComboBox<String>(netTypes);
    netType.setSelectedItem("Feed Forward Network");
    createNewNet = new JButton("create");
    cancelNew = new JButton("cancel");
    newDialog.add(name);
    newDialog.add(newName);
    newDialog.add(type);
    newDialog.add(netType);
    newDialog.add(createNewNet);
    newDialog.add(cancelNew);

    //utilities for a second dialog(Feed Forward Network) in the process of creating a new network   
    number = new JLabel("Enter the number of layers you want for your network:");
    howManyLayers = new JFormattedTextField(new NumberFormatter(NumberFormat.getIntegerInstance()));
    createFFNArchitecture = new JButton("OK");
    cancelFFN = new JButton("Cancel");

    howManyNodes = new JFormattedTextField(new NumberFormatter(NumberFormat.getIntegerInstance()));
    createFFN = new JButton("OK");
    cancelNodes = new JButton("Cancel");

    //Written by Michael Scott
    somLattice = new JLabel("   Lattice number for your Map:");
    somLatticeField = new JFormattedTextField(new NumberFormatter(NumberFormat.getIntegerInstance()));
    somLatticeField.setFocusLostBehavior(1);
    somMax = new JLabel("   Maximum value of your input (if known):");
    somMaxField = new JFormattedTextField(new NumberFormatter(NumberFormat.getInstance()));
    somMaxField.setFocusLostBehavior(1);
    somMin = new JLabel("   Minimum value of your input (if known):");
    somMinField = new JFormattedTextField(new NumberFormatter(NumberFormat.getInstance()));
    somMinField.setFocusLostBehavior(1);
    somDim = new JLabel("   Node Dimensions:");
    somDimField = new JFormattedTextField(new NumberFormatter(NumberFormat.getIntegerInstance()));
    somDimField.setFocusLostBehavior(1);
    createSOM = new JButton("OK");
    cancelSOM = new JButton("Cancel");

    //displays the newDialog window when newNet is pressed
    newNet.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {

            newDialog.setVisible(true);
        }
    });

    newwer.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            newDialog.setVisible(true);
        }
    });

    //makes hitting enter in the text box do the same thing as clicking "create"
    newName.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            for (ActionListener a : createNewNet.getActionListeners()) {
                a.actionPerformed(ae);
            }
        }
    });

    //when create net is pressed, this reads the selections from the newNet dialog and creates the approriate next dialog
    createNewNet.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            int test;
            test = 0;
            for (StringBuffer names : netName) {
                if (names.toString().equals(newName.getText()))
                    test = 1;
            }
            if (test == 0)
                if (!newName.getText().equals("")) {
                    if (netType.getSelectedIndex() == 0) { //if the net selected is Feed Forward, create and display the prompt for a feed forward network
                        newDialog.setVisible(false);
                        fFNDialog = new JDialog(mainWindow, newName.getText(), true);
                        fFNDialog.setSize(919, 65);
                        fFNDialog.setLayout(new GridLayout(2, 2));
                        fFNDialog.add(number);
                        fFNDialog.add(howManyLayers);
                        fFNDialog.add(createFFNArchitecture);
                        fFNDialog.add(cancelFFN);
                        fFNDialog.setVisible(true);
                    }
                    //Written by Michael Scott
                    if (netType.getSelectedIndex() == 1) {
                        newDialog.setVisible(false);
                        sOMDialog = new JDialog(mainWindow, newName.getText(), true);
                        sOMDialog.setSize(500, 180);
                        sOMDialog.setLayout(new GridLayout(5, 2));
                        sOMDialog.add(somLattice);
                        sOMDialog.add(somLatticeField);
                        sOMDialog.add(somDim);
                        sOMDialog.add(somDimField);
                        sOMDialog.add(somMax);
                        sOMDialog.add(somMaxField);
                        sOMDialog.add(somMin);
                        sOMDialog.add(somMinField);
                        sOMDialog.add(createSOM);
                        sOMDialog.add(cancelSOM);
                        sOMDialog.setVisible(true);

                    }
                } else
                    JOptionPane.showMessageDialog(createNewNet, "Network must have a Name",
                            "Namelessness Error", JOptionPane.ERROR_MESSAGE);
            else {
                JOptionPane.showMessageDialog(createNewNet, "Network " + newName.getText() + " already exists",
                        "Existential Naming Error", JOptionPane.ERROR_MESSAGE);
                newName.setText("");
            }
        }

    });
    //beginning of section about creating Feed Forward Networks   
    //cancel clears the name field and hides the newDialog dialog
    cancelNew.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            newDialog.setVisible(false);
            newName.setText("");
        }
    });

    //makes hitting enter the same as clicking "ok"
    howManyLayers.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            for (ActionListener a : createFFNArchitecture.getActionListeners()) {
                a.actionPerformed(ae);
            }
        }
    });

    //create a prompt for the first layer to determine how many nodes will go into the first layer
    createFFNArchitecture.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            if (!howManyLayers.getText().equals("")
                    && (layers = Integer.parseInt(howManyLayers.getText())) > 1) {
                nodeConfiguration = new int[layers]; //create an array to hold the node configuration that will be passed to the Net constructor
                layer = 1; //create a variable to hold the current layer the prompt series is on
                numberofNodes = new JLabel("How many nodes do you want in layer " + layer + "?");
                fFNDialog.setVisible(false);
                howManyNodesDialog = new JDialog(mainWindow, newName.getText(), true);
                howManyNodesDialog.setSize(919, 65);
                howManyNodesDialog.setLayout(new GridLayout(2, 2));
                howManyNodesDialog.add(numberofNodes);
                howManyNodesDialog.add(howManyNodes);
                howManyNodesDialog.add(createFFN);
                howManyNodesDialog.add(cancelNodes);
                howManyNodesDialog.setVisible(true);
            } else {
                //if the string is not valid, pop up an error message
                JOptionPane.showMessageDialog(fFNDialog,
                        "<html>Number Out of Bounds<br>Please Enter a Number Greater than 1</html>",
                        "Out of Bounds", JOptionPane.ERROR_MESSAGE);
            }
        }
    });

    //runs each time ok is pressed, until all the layers have a vaule for the number of nodes in the layer
    createFFN.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            if (!howManyNodes.getText().equals("")
                    && (nodeConfiguration[layer - 1] = Integer.parseInt(howManyNodes.getText())) > 0) {
                if (layer == layers) {
                    try {
                        //adds a close button to the top corner of each tab
                        title.add(new JLabel(newName.getText() + " "));
                        close.add(new JButton("X"));
                        close.get(openNets).setActionCommand(newName.getText());
                        close.get(openNets).setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
                        close.get(openNets).setMargin(new Insets(0, 0, 0, 0));
                        tabPanel.add(new JPanel(new GridBagLayout()));
                        tabPanel.get(openNets).setOpaque(false);
                        GridBagConstraints grid = new GridBagConstraints();
                        grid.fill = GridBagConstraints.HORIZONTAL;
                        grid.gridx = 0;
                        grid.gridy = 0;
                        grid.weightx = 1;
                        tabPanel.get(openNets).add(title.get(openNets), grid);
                        grid.gridx = 1;
                        grid.gridy = 0;
                        grid.weightx = 0;
                        tabPanel.get(openNets).add(close.get(openNets), grid);

                        //adds a loading bar
                        loadingBar.add(new JLabel("", loadingImage, SwingConstants.CENTER));
                        loadingBar.get(openNets).setHorizontalTextPosition(SwingConstants.LEFT);
                        loadingBar.get(openNets).setVisible(false);
                        //creates and sets the network configuration
                        net.add(new FullyConnectedFeedForwardNet(nodeConfiguration));

                        netKind.add(new StringBuffer(netType.getSelectedItem().toString()));
                        netName.add(new StringBuffer(newName.getText()));
                        oneNet.add(new JPanel());
                        oneNet.get(openNets).setLayout(new GridBagLayout());
                        GridBagConstraints constraints = new GridBagConstraints();
                        constraints.fill = GridBagConstraints.BOTH;

                        //creates the readOut space and formats it so that the scroll pane/text changes size with the window, reserves space for the loading bar
                        readOut.add(new JTextArea(""));
                        readOutLocale.add(new JScrollPane(readOut.get(openNets)));
                        readOut.get(openNets).setEditable(false);
                        constraints.gridx = 0;
                        constraints.gridy = 0;
                        constraints.weighty = 1.0;
                        constraints.weightx = 1.0;
                        constraints.gridwidth = 2;
                        constraints.ipady = 90;
                        oneNet.get(openNets).add(readOutLocale.get(openNets), constraints);
                        constraints.fill = GridBagConstraints.HORIZONTAL;
                        constraints.gridx = 0;
                        constraints.gridy = 1;
                        constraints.ipady = 0;
                        constraints.gridwidth = 2;
                        constraints.anchor = GridBagConstraints.PAGE_END;

                        //add everythign to the tabbed pane
                        oneNet.get(openNets).add(loadingBar.get(openNets), constraints);
                        resultsPane.addTab(netName.get(openNets).toString(), oneNet.get(openNets));
                        resultsPane.setTabComponentAt(openNets, tabPanel.get(openNets));

                        path.add("");

                        //display the starting configuration of the network
                        readOut.get(openNets).append("Network: " + netName.get(openNets) + "\n\n");
                        resultsPane.setSelectedIndex(openNets++);
                        printConnections();

                        //erases all the text in the setup fields and closes the window
                        howManyNodes.setValue(null);
                        howManyLayers.setText("");
                        newName.setText("");
                        howManyNodesDialog.setVisible(false);

                        //unfortunately difficult way that I made to add the close button functionality to close a tab
                        //it works, but there has to be a better way to do this
                        close.get(resultsPane.getSelectedIndex()).addActionListener(new ActionListener() {
                            public void actionPerformed(final ActionEvent ae) {
                                int result;
                                result = 0;
                                for (StringBuffer names : netName) {
                                    if (ae.getActionCommand().equals(names.toString())) {
                                        result = JOptionPane.showConfirmDialog(createFFN,
                                                "<html>Exiting Without Saving can Cause you to Lose your Progress<br>Are you sure you want to Continue?</html>",
                                                "Close Network", JOptionPane.OK_CANCEL_OPTION);
                                        resultsPane.setSelectedIndex(netName.indexOf(names));
                                    }
                                }
                                if (result == JOptionPane.OK_OPTION) {
                                    net.remove(resultsPane.getSelectedIndex());
                                    oneNet.remove(resultsPane.getSelectedIndex());
                                    readOutLocale.remove(resultsPane.getSelectedIndex());
                                    readOut.remove(resultsPane.getSelectedIndex());
                                    loadingBar.remove(resultsPane.getSelectedIndex());
                                    tabPanel.remove(resultsPane.getSelectedIndex());
                                    title.remove(resultsPane.getSelectedIndex());
                                    close.remove(resultsPane.getSelectedIndex());
                                    netName.remove(resultsPane.getSelectedIndex());
                                    resultsPane.remove(resultsPane.getSelectedIndex());
                                    openNets--;
                                }
                            }
                        });
                    } catch (OutOfMemoryError e) {
                        JOptionPane.showMessageDialog(mainWindow,
                                "<html>Net too Large for Memory.<br>Try Closing some of the Nets.</html>",
                                "Memory Error", JOptionPane.ERROR_MESSAGE);
                    }
                } else {
                    layer++;
                    howManyNodes.setText("");
                    numberofNodes.setText("How many nodes do you want in layer " + layer + "?");
                }

            } else {
                JOptionPane.showMessageDialog(createFFN,
                        "<html>Number Out of Bounds<br>Please Enter a Number Greater than 0", "Out of Bounds",
                        JOptionPane.ERROR_MESSAGE);
            }
        }
    });

    //makes hitting enter in text box the same as clicking ok
    howManyNodes.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            for (ActionListener a : createFFN.getActionListeners()) {
                a.actionPerformed(ae);
            }
        }
    });

    //cancels the node prompt
    cancelNodes.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            newName.setText("");
            howManyLayers.setText("");
            howManyNodes.setText("");
            howManyNodesDialog.setVisible(false);
        }
    });

    //cancel clears both name fields so far filled in the series of dialogs and hides the dialog
    cancelFFN.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            newName.setText("");
            howManyLayers.setText("");
            fFNDialog.setVisible(false);
        }
    });
    //end of section about creating FFNs
    //end of section about newNet   

    //Method to create a SOM
    createSOM.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            if (somLatticeField.getText().equals("") || somDimField.getText().equals("")) {
                JOptionPane.showMessageDialog(createSOM, "<html>Empty Field<br>Please Fill All Fields",
                        "Empty Field", JOptionPane.ERROR_MESSAGE);
            } else {
                if (somMaxField.getText().equals(""))
                    somMaxField.setText("100");
                if (somMinField.getText().equals(""))
                    somMinField.setText("0");
                if (Double.parseDouble(somMaxField.getText().replace(",", "")) < Double
                        .parseDouble(somMinField.getText().replace(",", ""))) {
                    JOptionPane.showMessageDialog(createSOM, "MIN GREATER THAN MAX!!!!", "Stupidity Error",
                            JOptionPane.ERROR_MESSAGE);
                }

                try {
                    //adds a close button to the top corner of each tab
                    title.add(new JLabel(newName.getText() + " "));
                    close.add(new JButton("X"));
                    close.get(openNets).setActionCommand(newName.getText());
                    close.get(openNets).setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
                    close.get(openNets).setMargin(new Insets(0, 0, 0, 0));
                    tabPanel.add(new JPanel(new GridBagLayout()));
                    tabPanel.get(openNets).setOpaque(false);
                    GridBagConstraints grid = new GridBagConstraints();
                    grid.fill = GridBagConstraints.HORIZONTAL;
                    grid.gridx = 0;
                    grid.gridy = 0;
                    grid.weightx = 1;
                    tabPanel.get(openNets).add(title.get(openNets), grid);
                    grid.gridx = 1;
                    grid.gridy = 0;
                    grid.weightx = 0;
                    tabPanel.get(openNets).add(close.get(openNets), grid);

                    //adds a loading bar
                    loadingBar.add(new JLabel("", loadingImage, SwingConstants.CENTER));
                    loadingBar.get(openNets).setHorizontalTextPosition(SwingConstants.LEFT);
                    loadingBar.get(openNets).setVisible(false);
                    //creates and sets the network configuration
                    net.add(new SelfOrganizingMap());

                    netKind.add(new StringBuffer(netType.getSelectedItem().toString()));
                    netName.add(new StringBuffer(newName.getText()));
                    oneNet.add(new JPanel());
                    oneNet.get(openNets).setLayout(new GridBagLayout());
                    GridBagConstraints constraints = new GridBagConstraints();
                    constraints.fill = GridBagConstraints.BOTH;

                    //creates the readOut space and formats it so that the scroll pane/text changes size with the window, reserves space for the loading bar
                    readOut.add(new JTextArea(""));
                    readOutLocale.add(new JScrollPane(readOut.get(openNets)));
                    readOut.get(openNets).setEditable(false);
                    constraints.gridx = 0;
                    constraints.gridy = 0;
                    constraints.weighty = 1.0;
                    constraints.weightx = 1.0;
                    constraints.gridwidth = 2;
                    constraints.ipady = 90;
                    oneNet.get(openNets).add(readOutLocale.get(openNets), constraints);
                    constraints.fill = GridBagConstraints.HORIZONTAL;
                    constraints.gridx = 0;
                    constraints.gridy = 1;
                    constraints.ipady = 0;
                    constraints.gridwidth = 2;
                    constraints.anchor = GridBagConstraints.PAGE_END;

                    //add everythign to the tabbed pane
                    oneNet.get(openNets).add(loadingBar.get(openNets), constraints);
                    resultsPane.addTab(netName.get(openNets).toString(), oneNet.get(openNets));
                    resultsPane.setTabComponentAt(openNets, tabPanel.get(openNets));

                    path.add("");

                    //display the starting configuration of the network
                    readOut.get(openNets).append("Network: " + netName.get(openNets) + "\n\n");
                    resultsPane.setSelectedIndex(openNets++);
                    try {
                        net.get(resultsPane.getSelectedIndex())
                                .setLatticeValue(Integer.parseInt(somLatticeField.getText().replace(",", "")));
                        net.get(resultsPane.getSelectedIndex())
                                .setDataMax(Double.parseDouble(somMaxField.getText().replace(",", "")));
                        net.get(resultsPane.getSelectedIndex())
                                .setDataMin(Double.parseDouble(somMinField.getText().replace(",", "")));
                        net.get(resultsPane.getSelectedIndex())
                                .setInputDimensions(Integer.parseInt(somDimField.getText().replace(",", "")));
                        net.get(resultsPane.getSelectedIndex()).runNet();
                        readOut.get(resultsPane.getSelectedIndex()).append("Initial Untrained Map:\n");
                        printInitMap();

                        if (!getColorMap.isVisible()) {
                            util.addSeparator();
                            util.add(getColorMap);
                            getColorMap.setVisible(true);
                        }

                        //erases all the text in the setup fields and closes the window
                        newName.setText("");
                        somLatticeField.setText("");
                        somDimField.setText("");
                        somMaxField.setText("");
                        somMinField.setText("");
                        sOMDialog.setVisible(false);

                        //unfortunately difficult way that I made to add the close button functionality to close a tab
                        //it works, but there has to be a better way to do this
                        close.get(resultsPane.getSelectedIndex()).addActionListener(new ActionListener() {
                            public void actionPerformed(final ActionEvent ae) {
                                int result;
                                result = 0;
                                for (StringBuffer names : netName) {
                                    if (ae.getActionCommand().equals(names.toString())) {
                                        result = JOptionPane.showConfirmDialog(createSOM,
                                                "<html>Exiting Without Saving can Cause you to Lose your Progress<br>Are you sure you want to Continue?</html>",
                                                "Close Network", JOptionPane.OK_CANCEL_OPTION);
                                        resultsPane.setSelectedIndex(netName.indexOf(names));
                                    }
                                }
                                if (result == JOptionPane.OK_OPTION) {
                                    net.remove(resultsPane.getSelectedIndex());
                                    oneNet.remove(resultsPane.getSelectedIndex());
                                    readOutLocale.remove(resultsPane.getSelectedIndex());
                                    readOut.remove(resultsPane.getSelectedIndex());
                                    loadingBar.remove(resultsPane.getSelectedIndex());
                                    tabPanel.remove(resultsPane.getSelectedIndex());
                                    title.remove(resultsPane.getSelectedIndex());
                                    close.remove(resultsPane.getSelectedIndex());
                                    netName.remove(resultsPane.getSelectedIndex());
                                    resultsPane.remove(resultsPane.getSelectedIndex());
                                    openNets--;
                                }
                            }
                        });
                    } catch (Exception e) {
                        net.remove(resultsPane.getSelectedIndex());
                        oneNet.remove(resultsPane.getSelectedIndex());
                        readOutLocale.remove(resultsPane.getSelectedIndex());
                        readOut.remove(resultsPane.getSelectedIndex());
                        loadingBar.remove(resultsPane.getSelectedIndex());
                        tabPanel.remove(resultsPane.getSelectedIndex());
                        title.remove(resultsPane.getSelectedIndex());
                        close.remove(resultsPane.getSelectedIndex());
                        netName.remove(resultsPane.getSelectedIndex());
                        resultsPane.remove(resultsPane.getSelectedIndex());
                        openNets--;
                        JOptionPane.showMessageDialog(sOMDialog, "Numbers too large to parse", "Parse error",
                                JOptionPane.ERROR_MESSAGE);
                    }
                } catch (OutOfMemoryError e) {
                    JOptionPane.showMessageDialog(mainWindow,
                            "<html>Net too Large for Memory.<br>Try Closing some of the Nets.</html>",
                            "Memory Error", JOptionPane.ERROR_MESSAGE);
                }
            }
        }
    });

    cancelSOM.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            newName.setText("");
            somLatticeField.setText("");
            somMaxField.setText("");
            somMinField.setText("");
            sOMDialog.setVisible(false);
        }
    });

    //end of SOM creation
    mainWindow.setVisible(true);
}

From source file:org.esa.beam.visat.toolviews.stat.StatisticsPanel.java

private void updateLeftPanel() {

    PagePanel pagePanel = new StatisticsSpreadsheetPagePanel(parentDialog, helpID, statisticsCriteriaPanel,
            statsSpreadsheet, this);
    pagePanel.initComponents();/*from  ww  w . j a va2 s. c om*/

    spreadsheetPanel.removeAll();
    //  JPanel statsSpeadPanel = statsSpreadsheetPanel();
    //  spreadsheetPanel.add(statsSpeadPanel);
    spreadsheetPanel.add(pagePanel);
    //   spreadsheetPanel.setBackground(Color.WHITE);
    spreadsheetScrollPane.setVisible(statisticsCriteriaPanel.showStatsSpreadSheet());
    spreadsheetScrollPane.setMinimumSize(new Dimension(100, 100));

    leftPanel.removeAll();
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridy = 0;
    gbc.gridx = 0;
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.fill = GridBagConstraints.BOTH;
    gbc.weightx = 1.0;
    gbc.weighty = 1.0;

    // histogramPanel.setVisible(showHistogramPlots);

    if (statisticsCriteriaPanel.showPercentPlots() || statisticsCriteriaPanel.showHistogramPlots()
            || statisticsCriteriaPanel.showStatsList()) {

        if ((numStxRegions + 1) > spreadsheetMinRowsBeforeWeight) {
            gbc.weighty = 1.0 - spreadsheetHeightWeight;
            leftPanel.add(contentScrollPane, gbc);

            gbc.fill = GridBagConstraints.BOTH;
            gbc.weighty = spreadsheetHeightWeight;

        } else {
            leftPanel.add(contentScrollPane, gbc);

            gbc.fill = GridBagConstraints.HORIZONTAL;
            gbc.weighty = 0;

            int buffer = 50;
            int minHeight = spreadsheetPanel.getPreferredSize().height + buffer;
            spreadsheetScrollPane.setMinimumSize(new Dimension(100, minHeight));
        }

        gbc.gridy += 1;
        gbc.insets.top = 10;

    } else {
        gbc.fill = GridBagConstraints.BOTH;
        gbc.weighty = 1.0;
    }

    if (statisticsCriteriaPanel.showStatsSpreadSheet()) {
        leftPanel.add(spreadsheetScrollPane, gbc);
    }

    //        gbc.gridy += 1;
    //        leftPanel.add(pagePanel, gbc);

    leftPanel.revalidate();
    leftPanel.repaint();

    contentPanel.revalidate();
    contentPanel.repaint();
    backgroundPanel.revalidate();
    backgroundPanel.repaint();

}

From source file:simMPLS.ui.simulator.JVentanaHija.java

/** Action when selecting static element.
 * @since 1.0//from   w  ww .j a  v  a2 s.c  om
 */
private void clicEnSeleccionalElementoEstadistica(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clicEnSeleccionalElementoEstadistica
    GridBagConstraints gbc = null;
    if (this.selectorElementoEstadisticas.getSelectedIndex() == 0) {
        this.panelAnalisis.removeAll();
        grafico1 = null;
        grafico2 = null;
        grafico3 = null;
        grafico4 = null;
        grafico5 = null;
        grafico6 = null;
        panelGrafico1 = null;
        panelGrafico2 = null;
        panelGrafico3 = null;
        panelGrafico4 = null;
        panelGrafico5 = null;
        panelGrafico6 = null;
        this.etiquetaEstadisticasTituloEscenario.setText(this.nombreEscenario.getText());
        this.etiquetaEstadisticasNombreAutor.setText(this.nombreAutor.getText());
        this.areaEstadisticasDescripcion.setText(this.descripcionEscenario.getText());
        this.etiquetaNombreElementoEstadistica.setIcon(null);
        this.etiquetaNombreElementoEstadistica
                .setText(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
                        .getString("JVentanaHija.SeleccioneElNodoAInspeccionar"));
        gbc = new java.awt.GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 0;
        gbc.insets = new Insets(10, 10, 10, 5);
        gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gbc.anchor = java.awt.GridBagConstraints.NORTH;
        this.panelFijo.add(this.etiquetaEstadisticasTituloEscenario, gbc);
        gbc = new java.awt.GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 1;
        gbc.insets = new Insets(10, 5, 10, 5);
        gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gbc.anchor = java.awt.GridBagConstraints.NORTH;
        this.panelFijo.add(this.etiquetaEstadisticasNombreAutor, gbc);
        gbc = new java.awt.GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 2;
        gbc.insets = new Insets(10, 5, 10, 5);
        gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gbc.anchor = java.awt.GridBagConstraints.NORTH;
        this.panelFijo.add(this.areaEstadisticasDescripcion, gbc);
        gbc = new java.awt.GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 3;
        gbc.insets = new Insets(10, 5, 10, 10);
        gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gbc.anchor = java.awt.GridBagConstraints.NORTH;
        this.panelFijo.add(this.etiquetaNombreElementoEstadistica, gbc);
        gbc = new java.awt.GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 0;
        gbc.insets = new Insets(10, 10, 10, 5);
        gbc.anchor = java.awt.GridBagConstraints.NORTH;
        gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
        this.panelAnalisis.add(this.panelFijo, gbc);
        this.panelAnalisis.repaint();
    } else {
        String nombreEltoSeleccionado = (String) this.selectorElementoEstadisticas.getSelectedItem();
        this.crearEInsertarGraficas(nombreEltoSeleccionado);
    }
}

From source file:erigo.ctstream.CTstream.java

/**
 * Pop up the GUI/*from www  .  ja  v  a 2 s  . c o  m*/
 * 
 * This method should be run in the event-dispatching thread.
 * 
 * The GUI is created in one of two modes depending on whether Shaped
 * windows are supported on the platform:
 * 
 * 1. If Shaped windows are supported then guiPanel (the container to
 *    which all other components are added) is RED and capturePanel is
 *    inset a small amount to this panel so that the RED border is seen
 *    around the outer edge.  A componentResized() method is defined
 *    which creates the hollowed out region that was capturePanel.
 * 2. If Shaped windows are not supported then guiPanel is transparent
 *    and capturePanel is translucent.  In this case, the user can't
 *    "reach through" capturePanel to interact with GUIs on the other
 *    side.
 * 
 * @param  bShapedWindowSupportedI  Does the underlying GraphicsDevice support the
 *                            PERPIXEL_TRANSPARENT translucency that is
 *                            required for Shaped windows?
 */
private void createAndShowGUI(boolean bShapedWindowSupportedI) {

    // No window decorations for translucent/transparent windows
    // (see note below)
    // JFrame.setDefaultLookAndFeelDecorated(true);

    //
    // Create GUI components
    //
    GridBagLayout framegbl = new GridBagLayout();
    guiFrame = new JFrame("CTstream");
    // To support a translucent window, the window must be undecorated
    // See notes in the class header up above about this; also see
    // http://alvinalexander.com/source-code/java/how-create-transparenttranslucent-java-jframe-mac-os-x
    guiFrame.setUndecorated(true);
    // Use MouseMotionListener to implement our own simple "window manager" for moving and resizing the window
    guiFrame.addMouseMotionListener(this);
    guiFrame.setBackground(new Color(0, 0, 0, 0));
    guiFrame.getContentPane().setBackground(new Color(0, 0, 0, 0));
    GridBagLayout gbl = new GridBagLayout();
    guiPanel = new JPanel(gbl);
    // if Shaped windows are supported, make guiPanel red;
    // otherwise make it transparent
    if (bShapedWindowSupportedI) {
        guiPanel.setBackground(Color.RED);
    } else {
        guiPanel.setBackground(new Color(0, 0, 0, 0));
    }
    guiFrame.setFont(new Font("Dialog", Font.PLAIN, 12));
    guiPanel.setFont(new Font("Dialog", Font.PLAIN, 12));
    GridBagLayout controlsgbl = new GridBagLayout();
    // *** controlsPanel contains the UI controls at the top of guiFrame
    controlsPanel = new JPanel(controlsgbl);
    controlsPanel.setBackground(new Color(211, 211, 211, 255));
    startStopButton = new JButton("Start");
    startStopButton.addActionListener(this);
    startStopButton.setBackground(Color.GREEN);
    continueButton = new JButton("Continue");
    continueButton.addActionListener(this);
    continueButton.setEnabled(false);
    screencapCheck = new JCheckBox("screen", bScreencap);
    screencapCheck.setBackground(controlsPanel.getBackground());
    screencapCheck.addActionListener(this);
    webcamCheck = new JCheckBox("camera", bWebcam);
    webcamCheck.setBackground(controlsPanel.getBackground());
    webcamCheck.addActionListener(this);
    audioCheck = new JCheckBox("audio", bAudio);
    audioCheck.setBackground(controlsPanel.getBackground());
    audioCheck.addActionListener(this);
    textCheck = new JCheckBox("text", bText);
    textCheck.setBackground(controlsPanel.getBackground());
    textCheck.addActionListener(this);
    JLabel fpsLabel = new JLabel("images/sec", SwingConstants.LEFT);
    fpsCB = new JComboBox<Double>(FPS_VALUES);
    int tempIndex = Arrays.asList(FPS_VALUES).indexOf(new Double(framesPerSec));
    fpsCB.setSelectedIndex(tempIndex);
    fpsCB.addActionListener(this);
    // The popup doesn't display over the transparent region;
    // therefore, just display a few rows to keep it within controlsPanel
    fpsCB.setMaximumRowCount(3);
    JLabel imgQualLabel = new JLabel("image qual", SwingConstants.LEFT);
    // The slider will use range 0 - 1000
    imgQualSlider = new JSlider(JSlider.HORIZONTAL, 0, 1000, (int) (imageQuality * 1000.0));
    // NOTE: The JSlider's initial width was too large, so I'd like to set its preferred size
    //       to try and constrain it some; also need to set its minimum size at the same time,
    //       or else when the user makes the GUI frame smaller, the JSlider would pop down to
    //       a really small minimum size.
    imgQualSlider.setPreferredSize(new Dimension(120, 30));
    imgQualSlider.setMinimumSize(new Dimension(120, 30));
    imgQualSlider.setBackground(controlsPanel.getBackground());
    includeMouseCursorCheck = new JCheckBox("Include mouse cursor in screen capture", bIncludeMouseCursor);
    includeMouseCursorCheck.setBackground(controlsPanel.getBackground());
    includeMouseCursorCheck.addActionListener(this);
    changeDetectCheck = new JCheckBox("Change detect", bChangeDetect);
    changeDetectCheck.setBackground(controlsPanel.getBackground());
    changeDetectCheck.addActionListener(this);
    fullScreenCheck = new JCheckBox("Full Screen", bFullScreen);
    fullScreenCheck.setBackground(controlsPanel.getBackground());
    fullScreenCheck.addActionListener(this);
    previewCheck = new JCheckBox("Preview", bPreview);
    previewCheck.setBackground(controlsPanel.getBackground());
    previewCheck.addActionListener(this);
    // Specify a small size for the text area, so that we can shrink down the UI w/o the scrollbars popping up
    textArea = new JTextArea(3, 10);
    // Add a Document listener to the JTextArea; this is how we will listen for changes to the document
    docChangeListener = new DocumentChangeListener(this);
    textArea.getDocument().addDocumentListener(docChangeListener);
    textScrollPane = new JScrollPane(textArea);
    // *** capturePanel
    capturePanel = new JPanel();
    if (!bShapedWindowSupportedI) {
        // Only make capturePanel translucent (ie, semi-transparent) if we aren't doing the Shaped window option
        capturePanel.setBackground(new Color(0, 0, 0, 16));
    } else {
        capturePanel.setBackground(new Color(0, 0, 0, 0));
    }
    capturePanel.setPreferredSize(new Dimension(500, 400));
    boolean bMacOS = false;
    String OS = System.getProperty("os.name", "generic").toLowerCase();
    if ((OS.indexOf("mac") >= 0) || (OS.indexOf("darwin") >= 0)) {
        bMacOS = true;
    }
    // Only have the CTstream UI stay on top of all other windows
    // if bStayOnTop is true (set by command line flag).  This is needed
    // for the Mac, because on that platform the user can't "reach through"
    // the capture frame to windows behind it.
    if (bStayOnTop) {
        guiFrame.setAlwaysOnTop(true);
    }

    //
    // Add components to the GUI
    //

    int row = 0;

    GridBagConstraints gbc = new GridBagConstraints();
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.weightx = 0;
    gbc.weighty = 0;

    //
    // First row: the controls panel
    //
    //  Add some extra horizontal padding around controlsPanel so the panel has some extra room
    // if we are running in web camera mode.
    gbc.insets = new Insets(0, 0, 0, 0);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 100;
    gbc.weighty = 0;
    Utility.add(guiPanel, controlsPanel, gbl, gbc, 0, row, 1, 1);
    gbc.insets = new Insets(0, 0, 0, 0);
    gbc.fill = GridBagConstraints.NONE;
    gbc.weightx = 0;
    gbc.weighty = 0;
    ++row;

    // Add controls to the controls panel
    int panelrow = 0;
    // (i) Start/Continue buttons
    GridBagLayout panelgbl = new GridBagLayout();
    JPanel subPanel = new JPanel(panelgbl);
    GridBagConstraints panelgbc = new GridBagConstraints();
    panelgbc.anchor = GridBagConstraints.WEST;
    panelgbc.fill = GridBagConstraints.NONE;
    panelgbc.weightx = 0;
    panelgbc.weighty = 0;
    subPanel.setBackground(controlsPanel.getBackground());
    panelgbc.insets = new Insets(0, 0, 0, 5);
    Utility.add(subPanel, startStopButton, panelgbl, panelgbc, 0, 0, 1, 1);
    panelgbc.insets = new Insets(0, 0, 0, 0);
    Utility.add(subPanel, continueButton, panelgbl, panelgbc, 1, 0, 1, 1);
    gbc.anchor = GridBagConstraints.CENTER;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets(5, 0, 0, 0);
    Utility.add(controlsPanel, subPanel, controlsgbl, gbc, 0, panelrow, 1, 1);
    ++panelrow;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.NONE;
    // (ii) select DataStreams to turn on
    panelgbl = new GridBagLayout();
    subPanel = new JPanel(panelgbl);
    panelgbc = new GridBagConstraints();
    panelgbc.anchor = GridBagConstraints.WEST;
    panelgbc.fill = GridBagConstraints.NONE;
    panelgbc.weightx = 0;
    panelgbc.weighty = 0;
    subPanel.setBackground(controlsPanel.getBackground());
    panelgbc.insets = new Insets(0, 0, 0, 0);
    Utility.add(subPanel, screencapCheck, panelgbl, panelgbc, 0, 0, 1, 1);
    Utility.add(subPanel, webcamCheck, panelgbl, panelgbc, 1, 0, 1, 1);
    Utility.add(subPanel, audioCheck, panelgbl, panelgbc, 2, 0, 1, 1);
    Utility.add(subPanel, textCheck, panelgbl, panelgbc, 3, 0, 1, 1);
    gbc.anchor = GridBagConstraints.CENTER;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets(0, 0, 0, 0);
    Utility.add(controlsPanel, subPanel, controlsgbl, gbc, 0, panelrow, 1, 1);
    ++panelrow;
    // (iii) images/sec control
    panelgbl = new GridBagLayout();
    subPanel = new JPanel(panelgbl);
    panelgbc = new GridBagConstraints();
    panelgbc.anchor = GridBagConstraints.WEST;
    panelgbc.fill = GridBagConstraints.NONE;
    panelgbc.weightx = 0;
    panelgbc.weighty = 0;
    subPanel.setBackground(controlsPanel.getBackground());
    panelgbc.insets = new Insets(2, 0, 0, 0);
    Utility.add(subPanel, fpsLabel, panelgbl, panelgbc, 0, 0, 1, 1);
    panelgbc.insets = new Insets(2, 10, 0, 10);
    Utility.add(subPanel, fpsCB, panelgbl, panelgbc, 1, 0, 1, 1);
    gbc.insets = new Insets(0, 0, 0, 0);
    gbc.anchor = GridBagConstraints.CENTER;
    Utility.add(controlsPanel, subPanel, controlsgbl, gbc, 0, panelrow, 1, 1);
    ++panelrow;
    // (iv) image quality slider
    panelgbl = new GridBagLayout();
    subPanel = new JPanel(panelgbl);
    panelgbc = new GridBagConstraints();
    panelgbc.anchor = GridBagConstraints.WEST;
    panelgbc.fill = GridBagConstraints.NONE;
    panelgbc.weightx = 0;
    panelgbc.weighty = 0;
    subPanel.setBackground(controlsPanel.getBackground());
    JLabel sliderLabelLow = new JLabel("Low", SwingConstants.LEFT);
    JLabel sliderLabelHigh = new JLabel("High", SwingConstants.LEFT);
    panelgbc.insets = new Insets(-5, 0, 0, 0);
    Utility.add(subPanel, imgQualLabel, panelgbl, panelgbc, 0, 0, 1, 1);
    panelgbc.insets = new Insets(-5, 5, 0, 5);
    Utility.add(subPanel, sliderLabelLow, panelgbl, panelgbc, 1, 0, 1, 1);
    panelgbc.insets = new Insets(0, 0, 0, 0);
    Utility.add(subPanel, imgQualSlider, panelgbl, panelgbc, 2, 0, 1, 1);
    panelgbc.insets = new Insets(-5, 5, 0, 0);
    Utility.add(subPanel, sliderLabelHigh, panelgbl, panelgbc, 3, 0, 1, 1);
    gbc.insets = new Insets(0, 0, 0, 0);
    gbc.anchor = GridBagConstraints.CENTER;
    Utility.add(controlsPanel, subPanel, controlsgbl, gbc, 0, panelrow, 1, 1);
    ++panelrow;
    // (v) Include mouse cursor in screen capture image?
    gbc.anchor = GridBagConstraints.CENTER;
    gbc.fill = GridBagConstraints.NONE;
    gbc.weightx = 0;
    gbc.weighty = 0;
    gbc.insets = new Insets(0, 15, 5, 15);
    Utility.add(controlsPanel, includeMouseCursorCheck, controlsgbl, gbc, 0, panelrow, 1, 1);
    gbc.fill = GridBagConstraints.NONE;
    gbc.weightx = 0;
    gbc.weighty = 0;
    ++panelrow;
    // (vi) Change detect / Full screen / Preview checkboxes
    panelgbl = new GridBagLayout();
    subPanel = new JPanel(panelgbl);
    panelgbc = new GridBagConstraints();
    panelgbc.anchor = GridBagConstraints.WEST;
    panelgbc.fill = GridBagConstraints.NONE;
    panelgbc.weightx = 0;
    panelgbc.weighty = 0;
    subPanel.setBackground(controlsPanel.getBackground());
    panelgbc.insets = new Insets(0, 0, 0, 0);
    Utility.add(subPanel, changeDetectCheck, panelgbl, panelgbc, 0, 0, 1, 1);
    Utility.add(subPanel, fullScreenCheck, panelgbl, panelgbc, 1, 0, 1, 1);
    Utility.add(subPanel, previewCheck, panelgbl, panelgbc, 2, 0, 1, 1);
    gbc.anchor = GridBagConstraints.CENTER;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets(-5, 0, 3, 0);
    Utility.add(controlsPanel, subPanel, controlsgbl, gbc, 0, panelrow, 1, 1);
    ++panelrow;
    // (vii) text field for the TextStream
    /*
    panelgbl = new GridBagLayout();
    subPanel = new JPanel(panelgbl);
    panelgbc = new GridBagConstraints();
    panelgbc.anchor = GridBagConstraints.CENTER;
    panelgbc.fill = GridBagConstraints.HORIZONTAL;
    panelgbc.weightx = 100;
    panelgbc.weighty = 100;
    subPanel.setBackground(controlsPanel.getBackground());
    panelgbc.insets = new Insets(0, 0, 0, 0);
    Utility.add(subPanel, textScrollPane, panelgbl, panelgbc, 1, 0, 1, 1);
    gbc.anchor = GridBagConstraints.CENTER;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 100;
    gbc.weighty = 100;
    gbc.insets = new Insets(0, 15, 3, 15);
    Utility.add(controlsPanel, subPanel, controlsgbl, gbc, 0, panelrow, 2, 1);
    ++panelrow;
    */
    gbc.anchor = GridBagConstraints.CENTER;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 100;
    gbc.weighty = 0;
    gbc.insets = new Insets(0, 15, 5, 15);
    Utility.add(controlsPanel, textScrollPane, controlsgbl, gbc, 0, panelrow, 1, 1);
    gbc.fill = GridBagConstraints.NONE;
    gbc.weightx = 0;
    gbc.weighty = 0;
    ++panelrow;

    //
    // Second row: the translucent/transparent capture panel
    //
    if (bShapedWindowSupportedI) {
        // Doing the Shaped window; set capturePanel inside guiPanel
        // a bit so the red from guiPanel shows at the edges
        gbc.insets = new Insets(5, 5, 5, 5);
    } else {
        // No shaped window; have capturePanel fill the area
        gbc.insets = new Insets(0, 0, 0, 0);
    }
    gbc.fill = GridBagConstraints.BOTH;
    gbc.weightx = 100;
    gbc.weighty = 100;
    Utility.add(guiPanel, capturePanel, gbl, gbc, 0, row, 1, 1);
    gbc.fill = GridBagConstraints.NONE;
    gbc.weightx = 0;
    gbc.weighty = 0;
    ++row;

    //
    // Add guiPanel to guiFrame
    //
    gbc.anchor = GridBagConstraints.CENTER;
    gbc.fill = GridBagConstraints.BOTH;
    gbc.weightx = 100;
    gbc.weighty = 100;
    gbc.insets = new Insets(0, 0, 0, 0);
    Utility.add(guiFrame, guiPanel, framegbl, gbc, 0, 0, 1, 1);

    //
    // Add menu
    //
    JMenuBar menuBar = createMenu();
    guiFrame.setJMenuBar(menuBar);

    //
    // If Shaped windows are supported, the region defined by capturePanel
    // will be "hollowed out" so that the user can reach through guiFrame
    // and interact with applications which are behind it.
    //
    // NOTE: This doesn't work on Mac OS (we've tried, but nothing seems
    //       to work to allow a user to reach through guiFrame to interact
    //       with windows behind).  May be a limitation or bug on Mac OS:
    //       https://bugs.openjdk.java.net/browse/JDK-8013450
    //
    if (bShapedWindowSupportedI) {
        guiFrame.addComponentListener(new ComponentAdapter() {
            // As the window is resized, the shape is recalculated here.
            @Override
            public void componentResized(ComponentEvent e) {
                // Create a rectangle to cover the entire guiFrame
                Area guiShape = new Area(new Rectangle(0, 0, guiFrame.getWidth(), guiFrame.getHeight()));
                // Create another rectangle to define the hollowed out region of capturePanel
                guiShape.subtract(new Area(new Rectangle(capturePanel.getX(), capturePanel.getY() + 23,
                        capturePanel.getWidth(), capturePanel.getHeight())));
                guiFrame.setShape(guiShape);
            }
        });
    }

    //
    // Final guiFrame configuration details and displaying the GUI
    //
    guiFrame.pack();

    guiFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

    guiFrame.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
            exit(false);
        }
    });

    // Center on the screen
    guiFrame.setLocationRelativeTo(null);

    //
    // Set the taskbar/dock icon; note that Mac OS has its own way of doing it
    //
    if (bMacOS) {
        try {
            // JPW 2018/02/02: changed how to load images to work under Java 9
            InputStream imageInputStreamLarge = getClass().getClassLoader()
                    .getResourceAsStream("Icon_128x128.png");
            BufferedImage bufferedImageLarge = ImageIO.read(imageInputStreamLarge);
            /**
             *
             * Java 9 note: running the following code under Java 9 on a Mac will produce the following warning:
             *
             * WARNING: An illegal reflective access operation has occurred
             * WARNING: Illegal reflective access by erigo.ctstream.CTstream (file:/Users/johnwilson/CT_versions/compiled_under_V8/CTstream.jar) to method com.apple.eawt.Application.getApplication()
             * WARNING: Please consider reporting this to the maintainers of erigo.ctstream.CTstream
             * WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
             * WARNING: All illegal access operations will be denied in a future release
             *
             * This is because Java 9 has taken a step away from using reflection; see see the section titled
             * "Illegal Access To Internal APIs" at https://blog.codefx.org/java/java-9-migration-guide/.
             *
             * A good fix (but only available in Java 9+) is to use the following:
             *
             *     java.awt.Taskbar taskbar = java.awt.Taskbar.getTaskbar();
             *     taskbar.setIconImage(bufferedImageLarge);
             *
             * Could use reflection to make calls in class com.apple.eawt.Application; for example, see
             * Bertil Chapuis' "dockicon.java" example code at https://gist.github.com/bchapuis/1562406
             *
             * For now, we just won't do dock icons under Mac OS.
             *
             **/
        } catch (Exception excepI) {
            System.err.println("Exception thrown trying to set icon: " + excepI);
        }
    } else {
        // The following has been tested under Windows 10 and Ubuntu 12.04 LTS
        try {
            // JPW 2018/02/02: changed how to load images to work under Java 9
            InputStream imageInputStreamLarge = getClass().getClassLoader()
                    .getResourceAsStream("Icon_128x128.png");
            BufferedImage bufferedImageLarge = ImageIO.read(imageInputStreamLarge);
            InputStream imageInputStreamMed = getClass().getClassLoader().getResourceAsStream("Icon_64x64.png");
            BufferedImage bufferedImageMed = ImageIO.read(imageInputStreamMed);
            InputStream imageInputStreamSmall = getClass().getClassLoader()
                    .getResourceAsStream("Icon_32x32.png");
            BufferedImage bufferedImageSmall = ImageIO.read(imageInputStreamSmall);
            List<BufferedImage> iconList = new ArrayList<BufferedImage>();
            iconList.add(bufferedImageLarge);
            iconList.add(bufferedImageMed);
            iconList.add(bufferedImageSmall);
            guiFrame.setIconImages(iconList);
        } catch (Exception excepI) {
            System.err.println("Exception thrown trying to set icon: " + excepI);
        }
    }

    ctSettings = new CTsettings(this, guiFrame);

    guiFrame.setVisible(true);

}

From source file:de.codesourcery.jasm16.ide.ui.views.SourceCodeView.java

private final JPanel createPanel() {
    disableDocumentListener(); // necessary because setting colors on editor pane triggers document change listeners (is considered a style change...)

    try {//w  ww  .  j a  va 2s  . c o m
        editorPane.setEditable(editable);
        editorPane.getDocument().addUndoableEditListener(undoListener);
        editorPane.setCaretColor(Color.WHITE);
        setupKeyBindings(editorPane);
        setColors(editorPane);
        editorScrollPane = new JScrollPane(editorPane);
        setColors(editorScrollPane);
        editorPane.addCaretListener(listener);
        editorPane.addMouseListener(mouseListener);
        editorPane.addMouseMotionListener(new MouseMotionAdapter() {

            @Override
            public void mouseMoved(MouseEvent e) {
                if ((e.getModifiersEx() & MouseEvent.CTRL_DOWN_MASK) != 0) // ctrl pressed
                {
                    final ASTNode node = getASTNodeForLocation(e.getPoint());
                    if (node instanceof SymbolReferenceNode) {
                        maybeUnderlineIdentifierAt(e.getPoint());
                    } else {
                        clearUnderlineHighlight();
                    }
                } else if (compilationUnit != null) {
                    String tooltipText = null;
                    if (compilationUnit != null) {
                        final ASTNode node = getASTNodeForLocation(e.getPoint());
                        if (node instanceof InvokeMacroNode) {
                            tooltipText = ExpandMacrosPhase.expandInvocation((InvokeMacroNode) node,
                                    compilationUnit);
                            if (tooltipText != null) {
                                tooltipText = "<html>" + tooltipText.replace("\n", "<br>") + "</html>";
                            }
                        }
                    }
                    if (!StringUtils.equals(editorPane.getToolTipText(), tooltipText)) {
                        editorPane.setToolTipText(tooltipText);
                    }
                }
            }
        });
        editorPane.addMouseListener(popupListener);
    } finally {
        enableDocumentListener();
    }

    EditorContainer.addEditorCloseKeyListener(editorPane, this);

    editorScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    editorScrollPane.setPreferredSize(new Dimension(400, 600));
    editorScrollPane.setMinimumSize(new Dimension(100, 100));

    final AdjustmentListener adjustmentListener = new AdjustmentListener() {

        @Override
        public void adjustmentValueChanged(AdjustmentEvent e) {
            if (!e.getValueIsAdjusting()) {
                if (compilationUnit != null) {
                    doHighlighting(compilationUnit, false);
                }
            }
        }
    };
    editorScrollPane.getVerticalScrollBar().addAdjustmentListener(adjustmentListener);
    editorScrollPane.getHorizontalScrollBar().addAdjustmentListener(adjustmentListener);

    // button panel
    final JPanel topPanel = new JPanel();

    final JToolBar toolbar = new JToolBar();

    setColors(toolbar);

    cursorPosition.setSize(new Dimension(400, 15));
    cursorPosition.setEditable(false);
    setColors(cursorPosition);

    /**
     * TOOLBAR
     * SOURCE
     * cursor position
     * status area 
     */
    topPanel.setLayout(new GridBagLayout());

    GridBagConstraints cnstrs = constraints(0, 0, GridBagConstraints.HORIZONTAL);
    cnstrs.gridwidth = GridBagConstraints.REMAINDER;
    cnstrs.weighty = 0;
    topPanel.add(toolbar, cnstrs);

    cnstrs = constraints(0, 1, GridBagConstraints.BOTH);
    cnstrs.gridwidth = GridBagConstraints.REMAINDER;
    topPanel.add(editorScrollPane, cnstrs);

    cnstrs = constraints(0, 2, GridBagConstraints.HORIZONTAL);
    cnstrs.gridwidth = GridBagConstraints.REMAINDER;
    cnstrs.weighty = 0;
    topPanel.add(cursorPosition, cnstrs);

    cnstrs = constraints(0, 3, GridBagConstraints.HORIZONTAL);
    cnstrs.gridwidth = GridBagConstraints.REMAINDER;
    cnstrs.weighty = 0;

    // setup result panel
    final JPanel panel = new JPanel();
    panel.setLayout(new GridBagLayout());
    setColors(panel);
    cnstrs = constraints(0, 0, true, true, GridBagConstraints.BOTH);
    panel.add(topPanel, cnstrs);
    return panel;
}

From source file:org.gtdfree.GTDFree.java

private Component getOverviewPane() {
    if (overview == null) {
        overview = new JPanel();
        overview.setLayout(new GridBagLayout());

        int row = 0;

        JLabel l = new JLabel(Messages.getString("GTDFree.OW.Workflow")); //$NON-NLS-1$
        l.setFont(l.getFont().deriveFont((float) (l.getFont().getSize() * 5.0 / 4.0)).deriveFont(Font.BOLD));
        overview.add(l, new GridBagConstraints(0, row++, 1, 1, 1, 0, GridBagConstraints.CENTER,
                GridBagConstraints.HORIZONTAL, new Insets(18, 18, 7, 18), 0, 0));

        overview.add(/*from   ww w.  j a v  a2s  .  c o  m*/
                new OverviewTabPanel(ApplicationHelper.getIcon(ApplicationHelper.icon_name_large_collecting),
                        TAB_COLECT, Messages.getString("GTDFree.Collect")), //$NON-NLS-1$
                new GridBagConstraints(0, row++, 1, 1, 1, 0, GridBagConstraints.CENTER,
                        GridBagConstraints.HORIZONTAL, new Insets(0, 18, 4, 18), 0, 0));
        overview.add(
                new OverviewTabPanel(ApplicationHelper.getIcon(ApplicationHelper.icon_name_large_processing),
                        TAB_PROCESS, Messages.getString("GTDFree.Process")), //$NON-NLS-1$
                new GridBagConstraints(0, row++, 1, 1, 1, 0, GridBagConstraints.CENTER,
                        GridBagConstraints.HORIZONTAL, new Insets(0, 18, 4, 18), 0, 0));
        overview.add(
                new OverviewTabPanel(ApplicationHelper.getIcon(ApplicationHelper.icon_name_large_review),
                        TAB_ORGANIZE, Messages.getString("GTDFree.Organize")), //$NON-NLS-1$
                new GridBagConstraints(0, row++, 1, 1, 0, 0, GridBagConstraints.CENTER,
                        GridBagConstraints.HORIZONTAL, new Insets(0, 18, 4, 18), 0, 0));
        overview.add(
                new OverviewTabPanel(ApplicationHelper.getIcon(ApplicationHelper.icon_name_large_queue_execute),
                        TAB_EXECUTE, Messages.getString("GTDFree.Execute")), //$NON-NLS-1$
                new GridBagConstraints(0, row++, 1, 1, 1, 0, GridBagConstraints.CENTER,
                        GridBagConstraints.HORIZONTAL, new Insets(0, 18, 4, 18), 0, 0));

        l = new JLabel(Messages.getString("GTDFree.OW.Summary")); //$NON-NLS-1$
        l.setFont(l.getFont().deriveFont((float) (l.getFont().getSize() * 5.0 / 4.0)).deriveFont(Font.BOLD));
        overview.add(l, new GridBagConstraints(0, row++, 1, 1, 1, 0, GridBagConstraints.CENTER,
                GridBagConstraints.HORIZONTAL, new Insets(14, 18, 7, 18), 0, 0));

        SummaryLabel sl = new SummaryLabel("inbucketCount") { //$NON-NLS-1$
            private static final long serialVersionUID = 1L;

            @Override
            public void actionPerformed(ActionEvent e) {
                tabbedPane.setSelectedIndex(TAB_PROCESS);
            }

            @Override
            void updateText(PropertyChangeEvent arg0) {
                if (getSummaryBean().getInbucketCount() > 0) {
                    label.setText(
                            getSummaryBean().getInbucketCount() + " " + Messages.getString("GTDFree.OW.Bucket") //$NON-NLS-1$//$NON-NLS-2$
                                    + " " + Messages.getString("GTDFree.OW.Process")); //$NON-NLS-1$ //$NON-NLS-2$
                    button.setVisible(true);
                } else {
                    label.setText(getSummaryBean().getInbucketCount() + " " //$NON-NLS-1$
                            + Messages.getString("GTDFree.OW.Bucket")); //$NON-NLS-1$
                    button.setVisible(false);
                }
            }
        };
        overview.add(sl, new GridBagConstraints(0, row++, 1, 1, 1, 0, GridBagConstraints.WEST,
                GridBagConstraints.HORIZONTAL, new Insets(0, 18, 4, 18), 0, 0));

        sl = new SummaryLabel("pastActions") { //$NON-NLS-1$
            private static final long serialVersionUID = 1L;

            @Override
            public void actionPerformed(ActionEvent e) {
                tabbedPane.setSelectedIndex(TAB_ORGANIZE);
                organizePane.openTicklerForPast();
            }

            @Override
            void updateText(PropertyChangeEvent arg0) {
                if (getSummaryBean().getPastActions() > 0) {
                    label.setText(
                            getSummaryBean().getPastActions() + " " + Messages.getString("GTDFree.OW.Reminder") //$NON-NLS-1$//$NON-NLS-2$
                                    + " " + Messages.getString("GTDFree.OW.Update")); //$NON-NLS-1$ //$NON-NLS-2$
                    button.setVisible(true);
                } else {
                    label.setText(getSummaryBean().getPastActions() + " " //$NON-NLS-1$
                            + Messages.getString("GTDFree.OW.Reminder")); //$NON-NLS-1$
                    button.setVisible(false);

                }
            }
        };
        overview.add(sl, new GridBagConstraints(0, row++, 1, 1, 1, 0, GridBagConstraints.WEST,
                GridBagConstraints.HORIZONTAL, new Insets(0, 18, 4, 18), 0, 0));

        sl = new SummaryLabel("todayActions") { //$NON-NLS-1$
            private static final long serialVersionUID = 1L;

            @Override
            public void actionPerformed(ActionEvent e) {
                tabbedPane.setSelectedIndex(TAB_ORGANIZE);
                organizePane.openTicklerForToday();
            }

            @Override
            void updateText(PropertyChangeEvent arg0) {
                if (getSummaryBean().getTodayActions() > 0) {
                    label.setText(
                            getSummaryBean().getTodayActions() + " " + Messages.getString("GTDFree.OW.Due") //$NON-NLS-1$//$NON-NLS-2$
                                    + " " + Messages.getString("GTDFree.OW.Tickler")); //$NON-NLS-1$ //$NON-NLS-2$
                    button.setVisible(true);
                } else {
                    label.setText(
                            getSummaryBean().getTodayActions() + " " + Messages.getString("GTDFree.OW.Due")); //$NON-NLS-1$ //$NON-NLS-2$
                    button.setVisible(false);

                }
            }
        };
        overview.add(sl, new GridBagConstraints(0, row++, 1, 1, 1, 0, GridBagConstraints.WEST,
                GridBagConstraints.HORIZONTAL, new Insets(0, 18, 4, 18), 0, 0));

        sl = new SummaryLabel("queueCount") { //$NON-NLS-1$
            private static final long serialVersionUID = 1L;

            @Override
            public void actionPerformed(ActionEvent e) {
                tabbedPane.setSelectedIndex(TAB_EXECUTE);
            }

            @Override
            void updateText(PropertyChangeEvent arg0) {
                if (getSummaryBean().getQueueCount() > 0) {
                    label.setText(
                            getSummaryBean().getQueueCount() + " " + Messages.getString("GTDFree.OW.Queue") //$NON-NLS-1$//$NON-NLS-2$
                                    + " " + Messages.getString("GTDFree.OW.Execute")); //$NON-NLS-1$ //$NON-NLS-2$
                    button.setVisible(true);
                } else {
                    label.setText(
                            getSummaryBean().getQueueCount() + " " + Messages.getString("GTDFree.OW.Queue")); //$NON-NLS-1$ //$NON-NLS-2$
                    button.setVisible(false);

                }
            }
        };
        overview.add(sl, new GridBagConstraints(0, row++, 1, 1, 1, 0, GridBagConstraints.WEST,
                GridBagConstraints.HORIZONTAL, new Insets(0, 18, 4, 18), 0, 0));

        sl = new SummaryLabel("mainCounts") { //$NON-NLS-1$
            private static final long serialVersionUID = 1L;

            @Override
            public void actionPerformed(ActionEvent e) {
                GTDFree.this.getActionMap().get("importDialog").actionPerformed(e); //$NON-NLS-1$
                engine.getGlobalProperties().putProperty("examplesImported", true); //$NON-NLS-1$
                updateText(new PropertyChangeEvent(this, "mainCounts", -1, 1)); //$NON-NLS-1$
            }

            @Override
            void updateText(PropertyChangeEvent arg0) {
                if (!getEngine().getGlobalProperties().getBoolean("examplesImported", false)) { //$NON-NLS-1$
                    label.setText(getSummaryBean().getOpenCount() + " " //$NON-NLS-1$
                            + Messages.getString("GTDFree.OW.Open.1") + " " + getSummaryBean().getTotalCount() //$NON-NLS-1$//$NON-NLS-2$
                            + " " + Messages.getString("GTDFree.OW.Open.2") + " " //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
                            + Messages.getString("GTDFree.OW.Import")); //$NON-NLS-1$
                    button.setVisible(true);
                } else {
                    label.setText(getSummaryBean().getOpenCount() + " " //$NON-NLS-1$
                            + Messages.getString("GTDFree.OW.Open.1") + " " + getSummaryBean().getTotalCount() //$NON-NLS-1$//$NON-NLS-2$
                            + " " + Messages.getString("GTDFree.OW.Open.2")); //$NON-NLS-1$ //$NON-NLS-2$
                    button.setVisible(false);

                }
            }
        };
        overview.add(sl, new GridBagConstraints(0, row++, 1, 1, 1, 0, GridBagConstraints.WEST,
                GridBagConstraints.HORIZONTAL, new Insets(0, 18, 4, 18), 0, 0));

        overview.add(new JPanel(), new GridBagConstraints(0, row++, 1, 1, 1, 1, GridBagConstraints.WEST,
                GridBagConstraints.NONE, new Insets(0, 11, 0, 11), 0, 0));

    }

    return overview;
}

From source file:statistic.ca.gui.JCAStatisticPanel.java

private JPanel addPropertiesComponents() {
    JPanel p = new JPanel(new GridBagLayout());

    String[] statisticTypeNames = { "Grundinformationen", "Ausgangsverteilung", "Ankunftskurve",
            "evakuierte Individuen in Prozent", "maximale Blockadezeit", "durchschnittliche Blockadezeit",
            "minimale Blockadezeit", "zurckgelegte Distanz", "minimale Distanz zum initialen Ausgang",
            "minimale Distanz zum nchsten Ausgang", "Distanz ber Zeit", "maximale Zeit bis Safe",
            "durchschnittliche Zeit bis Safe", "minimale Zeit bis Safe", "maximale Geschwindigkeit ber Zeit",
            "durschnittliche Geschwindigkeit ber Zeit", "maximale Geschwindigkeit",
            "durchschnittliche Geschwindigkeit", "Panik ber Zeit", "Erschpfung ber Zeit" };
    statisticType = new JComboBox(statisticTypeNames);
    statisticType.addActionListener(new TypePerformed());

    JPanel timeIntervalGroup = new JPanel();
    timeInterval = new JLabel("Zeitintervall:");
    timeIntervalFrom = new JTextField(4);
    timeIntervalTo = new JTextField(4);
    timeIntervalGroup.add(timeInterval);
    timeIntervalGroup.add(timeIntervalFrom);
    timeIntervalGroup.add(new JLabel(" - "));
    timeIntervalGroup.add(timeIntervalTo);

    assignmentListModel = new DefaultListModel();
    assignmentList = new JList(assignmentListModel); // data has type Object[]
    assignmentList.getSelectionModel().addListSelectionListener(new AssignmentTypeListSelect());
    assignmentList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    assignmentList.setLayoutOrientation(JList.VERTICAL);
    assignmentList.setVisibleRowCount(-1);

    JScrollPane listScroller = new JScrollPane(assignmentList);
    listScroller.setPreferredSize(new Dimension(100, 50));

    JPanel assignmentButtons = new JPanel();
    JButton btn_group = new JButton("Group");
    JButton btn_ungroup = new JButton("Ungroup");
    btn_group.addActionListener(new GroupPreformed());
    btn_ungroup.addActionListener(new UngroupPreformed());
    assignmentButtons.add(btn_group);//  w  w  w.  j  a  va 2s  .co m
    assignmentButtons.add(btn_ungroup);

    JButton btn_createDiagram = new JButton("Create Diagram");
    btn_createDiagram.addActionListener(new CreateDiagramPerformed());

    JButton btn_removeDiagram = new JButton("Remove Diagram");
    btn_removeDiagram.addActionListener(new RemovePerformed());

    JPanel diagramButtonGroup = new JPanel();
    diagramButtonGroup.add(btn_createDiagram);
    diagramButtonGroup.add(btn_removeDiagram);

    diagramCategoryListModel = new DefaultListModel();
    diagramCategoryList = new JList(diagramCategoryListModel); // data has type
    // Object[]
    diagramCategoryList.getSelectionModel().addListSelectionListener(new DiagramCategoryListSelect());
    diagramCategoryList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    diagramCategoryList.setLayoutOrientation(JList.VERTICAL);
    diagramCategoryList.setVisibleRowCount(-1);

    JScrollPane diagramCategoryListScroller = new JScrollPane(diagramCategoryList);
    diagramCategoryListScroller.setPreferredSize(new Dimension(100, 50));

    JPanel buttonGroup = new JPanel();
    JButton btn_addToDiagram = new JButton("Add to Diagram");
    JButton btn_removeFromDiagram = new JButton("Remove from Diagram");
    buttonGroup.add(btn_addToDiagram);
    buttonGroup.add(btn_removeFromDiagram);
    btn_addToDiagram.addActionListener(new AddToDiagramPerformed());
    btn_removeFromDiagram.addActionListener(new RemoveFromDiagramPerformed());

    // Create statisticSource at last because we need the GUI Objects above to initialize
    // our selection in BatchResultEntryComboBoxModel.setSelectedItem ()
    model = new BatchResultEntryComboBoxModel();
    statisticSource = new JComboBox(model);

    int y = 0;
    p.add(statisticType, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
    p.add(statisticSource, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
    p.add(new JSeparator(SwingConstants.HORIZONTAL), new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0,
            GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    p.add(new JLabel("Belegungen"), new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
    p.add(listScroller, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.5, GridBagConstraints.CENTER,
            GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0));
    p.add(assignmentButtons, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
    p.add(new JSeparator(SwingConstants.HORIZONTAL), new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0,
            GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    p.add(buttonGroup, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
    p.add(new JSeparator(SwingConstants.HORIZONTAL), new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0,
            GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    p.add(diagramCategoryListScroller, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.5, GridBagConstraints.CENTER,
            GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0));
    p.add(diagramButtonGroup, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
    return p;
}