Example usage for java.awt GridBagConstraints NORTH

List of usage examples for java.awt GridBagConstraints NORTH

Introduction

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

Prototype

int NORTH

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

Click Source Link

Document

Put the component at the top of its display area, centered horizontally.

Usage

From source file:ca.uhn.hl7v2.testpanel.ui.conn.Hl7ConnectionPanel.java

/**
 * Create the panel./*from ww  w. j  a va 2  s. c o m*/
 */
public Hl7ConnectionPanel(Controller theController) {
    setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] { 150, 0 };
    gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
    gridBagLayout.columnWeights = new double[] { 0.0, 1.0 };
    gridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE };
    setLayout(gridBagLayout);

    mySinglePortRadio = new JRadioButton("Single Port MLLP");
    mySinglePortRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updatePortsModel();
            updatePortsUi();
        }
    });
    myPortButtonGroup.add(mySinglePortRadio);
    GridBagConstraints gbc_SinglePortRadio = new GridBagConstraints();
    gbc_SinglePortRadio.anchor = GridBagConstraints.WEST;
    gbc_SinglePortRadio.insets = new Insets(0, 0, 5, 5);
    gbc_SinglePortRadio.gridx = 0;
    gbc_SinglePortRadio.gridy = 0;
    add(mySinglePortRadio, gbc_SinglePortRadio);

    JPanel panel_4 = new JPanel();
    panel_4.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel_4 = new GridBagConstraints();
    gbc_panel_4.fill = GridBagConstraints.BOTH;
    gbc_panel_4.insets = new Insets(0, 0, 5, 0);
    gbc_panel_4.gridx = 1;
    gbc_panel_4.gridy = 0;
    add(panel_4, gbc_panel_4);
    GridBagLayout gbl_panel_4 = new GridBagLayout();
    gbl_panel_4.columnWidths = new int[] { 0, 0, 0 };
    gbl_panel_4.rowHeights = new int[] { 0, 0 };
    gbl_panel_4.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE };
    gbl_panel_4.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel_4.setLayout(gbl_panel_4);

    mySinglePortTextBox = new JTextField();
    mySinglePortTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            String text = mySinglePortTextBox.getText();
            text = text.replaceAll("[^0-9]+", "");
            if (!StringUtils.equals(mySinglePortTextBox.getText(), text)) {
                final String newVal = text;
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        mySinglePortTextBox.setText(newVal);
                    }
                });
            }
            if (mySinglePortRadio.isSelected()) {
                if (text.length() > 0) {
                    myConnection.setIncomingOrSinglePort(Integer.parseInt(text));
                } else {
                    myConnection.setIncomingOrSinglePort(-1);
                }
            }
        }
    });

    mylabel = new JLabel("Port");
    mylabel.setHorizontalAlignment(SwingConstants.CENTER);
    mylabel.setPreferredSize(new Dimension(60, 16));
    mylabel.setMinimumSize(new Dimension(60, 16));
    mylabel.setMaximumSize(new Dimension(60, 16));
    GridBagConstraints gbc_label = new GridBagConstraints();
    gbc_label.anchor = GridBagConstraints.EAST;
    gbc_label.insets = new Insets(0, 0, 0, 5);
    gbc_label.gridx = 0;
    gbc_label.gridy = 0;
    panel_4.add(mylabel, gbc_label);
    GridBagConstraints gbc_SinglePortTextBox = new GridBagConstraints();
    gbc_SinglePortTextBox.insets = new Insets(0, 5, 0, 0);
    gbc_SinglePortTextBox.anchor = GridBagConstraints.WEST;
    gbc_SinglePortTextBox.gridx = 1;
    gbc_SinglePortTextBox.gridy = 0;
    panel_4.add(mySinglePortTextBox, gbc_SinglePortTextBox);
    mySinglePortTextBox.setMinimumSize(new Dimension(100, 28));
    mySinglePortTextBox.setMaximumSize(new Dimension(100, 2147483647));
    mySinglePortTextBox.setColumns(10);

    myDualPortRadio = new JRadioButton("Dual Port MLLP");
    myDualPortRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updatePortsModel();
            updatePortsUi();
        }
    });
    myPortButtonGroup.add(myDualPortRadio);
    GridBagConstraints gbc_DualPortRadio = new GridBagConstraints();
    gbc_DualPortRadio.anchor = GridBagConstraints.WEST;
    gbc_DualPortRadio.insets = new Insets(0, 0, 5, 5);
    gbc_DualPortRadio.gridx = 0;
    gbc_DualPortRadio.gridy = 1;
    add(myDualPortRadio, gbc_DualPortRadio);

    JPanel panel = new JPanel();
    panel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_BottomPanel = new GridBagConstraints();
    gbc_BottomPanel.insets = new Insets(0, 0, 5, 0);
    gbc_BottomPanel.fill = GridBagConstraints.BOTH;
    gbc_BottomPanel.gridx = 1;
    gbc_BottomPanel.gridy = 1;
    add(panel, gbc_BottomPanel);
    GridBagLayout gbl_panel = new GridBagLayout();
    gbl_panel.columnWidths = new int[] { 0, 0, 0, 0, 0, 0 };
    gbl_panel.rowHeights = new int[] { 0, 0 };
    gbl_panel.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };
    gbl_panel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel.setLayout(gbl_panel);

    JLabel lblInbound = new JLabel("Inbound");
    lblInbound.setHorizontalAlignment(SwingConstants.CENTER);
    lblInbound.setPreferredSize(new Dimension(60, 16));
    lblInbound.setMinimumSize(new Dimension(60, 16));
    lblInbound.setMaximumSize(new Dimension(60, 16));
    GridBagConstraints gbc_lblInbound = new GridBagConstraints();
    gbc_lblInbound.insets = new Insets(0, 5, 0, 5);
    gbc_lblInbound.anchor = GridBagConstraints.EAST;
    gbc_lblInbound.gridx = 0;
    gbc_lblInbound.gridy = 0;
    panel.add(lblInbound, gbc_lblInbound);

    myDualIncomingTextBox = new JTextField();
    myDualIncomingTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            String text = myDualIncomingTextBox.getText();
            text = text.replaceAll("[^0-9]+", "");
            if (!StringUtils.equals(myDualIncomingTextBox.getText(), text)) {
                final String newVal = text;
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        myDualIncomingTextBox.setText(newVal);
                    }
                });
            }
            if (myDualPortRadio.isSelected()) {
                if (text.length() > 0) {
                    myConnection.setIncomingOrSinglePort(Integer.parseInt(text));
                } else {
                    myConnection.setIncomingOrSinglePort(-1);
                }
            }
        }
    });
    myDualIncomingTextBox.setMaximumSize(new Dimension(100, 2147483647));
    myDualIncomingTextBox.setMinimumSize(new Dimension(100, 28));
    GridBagConstraints gbc_DualIncomingTextBox = new GridBagConstraints();
    gbc_DualIncomingTextBox.anchor = GridBagConstraints.WEST;
    gbc_DualIncomingTextBox.insets = new Insets(0, 0, 0, 5);
    gbc_DualIncomingTextBox.gridx = 1;
    gbc_DualIncomingTextBox.gridy = 0;
    panel.add(myDualIncomingTextBox, gbc_DualIncomingTextBox);
    myDualIncomingTextBox.setColumns(10);

    JLabel lblOutbound = new JLabel("Outbound");
    GridBagConstraints gbc_lblOutbound = new GridBagConstraints();
    gbc_lblOutbound.anchor = GridBagConstraints.EAST;
    gbc_lblOutbound.insets = new Insets(0, 0, 0, 5);
    gbc_lblOutbound.gridx = 2;
    gbc_lblOutbound.gridy = 0;
    panel.add(lblOutbound, gbc_lblOutbound);

    myDualOutgoingTextBox = new JTextField();
    myDualOutgoingTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            String text = myDualOutgoingTextBox.getText();
            text = text.replaceAll("[^0-9]+", "");
            if (!StringUtils.equals(myDualOutgoingTextBox.getText(), text)) {
                final String newVal = text;
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        myDualOutgoingTextBox.setText(newVal);
                    }
                });
            }
            if (myDualPortRadio.isSelected()) {
                if (text.length() > 0) {
                    myConnection.setOutgoingPort(Integer.parseInt(text));
                } else {
                    myConnection.setOutgoingPort(-1);
                }
            }
        }
    });
    myDualOutgoingTextBox.setMinimumSize(new Dimension(100, 28));
    myDualOutgoingTextBox.setMaximumSize(new Dimension(100, 2147483647));
    GridBagConstraints gbc_DualOutgoingTextBox = new GridBagConstraints();
    gbc_DualOutgoingTextBox.insets = new Insets(0, 0, 0, 5);
    gbc_DualOutgoingTextBox.anchor = GridBagConstraints.WEST;
    gbc_DualOutgoingTextBox.gridx = 3;
    gbc_DualOutgoingTextBox.gridy = 0;
    panel.add(myDualOutgoingTextBox, gbc_DualOutgoingTextBox);
    myDualOutgoingTextBox.setColumns(10);

    myHl7OverHttpRadioButton = new JRadioButton("HL7 over HTTP");
    myHl7OverHttpRadioButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updatePortsModel();
            updatePortsUi();
        }
    });
    myPortButtonGroup.add(myHl7OverHttpRadioButton);
    GridBagConstraints gbc_Hl7OverHttpRadioButton = new GridBagConstraints();
    gbc_Hl7OverHttpRadioButton.anchor = GridBagConstraints.WEST;
    gbc_Hl7OverHttpRadioButton.insets = new Insets(0, 0, 5, 5);
    gbc_Hl7OverHttpRadioButton.gridx = 0;
    gbc_Hl7OverHttpRadioButton.gridy = 2;
    add(myHl7OverHttpRadioButton, gbc_Hl7OverHttpRadioButton);

    mypanel = new JPanel();
    mypanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel = new GridBagConstraints();
    gbc_panel.insets = new Insets(0, 0, 5, 0);
    gbc_panel.fill = GridBagConstraints.BOTH;
    gbc_panel.gridx = 1;
    gbc_panel.gridy = 2;
    add(mypanel, gbc_panel);
    GridBagLayout gbl_panel2 = new GridBagLayout();
    gbl_panel2.columnWidths = new int[] { 0, 0 };
    gbl_panel2.rowHeights = new int[] { 0, 0 };
    gbl_panel2.columnWeights = new double[] { 0.0, 1.0 };
    gbl_panel2.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    mypanel.setLayout(gbl_panel2);

    mylabel_1 = new JLabel("URL");
    mylabel_1.setHorizontalAlignment(SwingConstants.CENTER);
    mylabel_1.setPreferredSize(new Dimension(60, 16));
    mylabel_1.setMinimumSize(new Dimension(60, 16));
    mylabel_1.setMaximumSize(new Dimension(60, 16));
    GridBagConstraints gbc_label_1 = new GridBagConstraints();
    gbc_label_1.anchor = GridBagConstraints.EAST;
    gbc_label_1.insets = new Insets(0, 0, 0, 5);
    gbc_label_1.gridx = 0;
    gbc_label_1.gridy = 0;
    mypanel.add(mylabel_1, gbc_label_1);

    myHoHUrlTextField = new JTextField();
    myHoHUrlTextField.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            if (myHohUrlTextFieldUpdating) {
                return;
            }

            String value = myHoHUrlTextField.getText();
            try {
                URL url = new URL(value);
                boolean tls;
                if (url.getProtocol().equals("http")) {
                    tls = false;
                } else if (url.getProtocol().equals("https")) {
                    tls = true;
                } else {
                    ourLog.info("Unknown protocol: {}", url.getProtocol());
                    myHoHUrlTextField.setBackground(ERROR_BG);
                    return;
                }

                myConnection.setTls(tls);
                myConnection.setHost(url.getHost());
                myConnection
                        .setIncomingOrSinglePort(url.getPort() != -1 ? url.getPort() : url.getDefaultPort());
                myConnection.setHttpUriPath(url.getPath());

                myHohUrlTextFieldUpdating = true;
                updatePortsUi();
                myHohUrlTextFieldUpdating = false;

                myTlsCheckbox.setSelected(tls);
                myHohTlsCheckbox.setSelected(tls);

                myHoHUrlTextField.setBackground(Color.white);
            } catch (MalformedURLException e) {
                myHoHUrlTextField.setBackground(ERROR_BG);
            }

        }
    });
    GridBagConstraints gbc_HohUsernameTextbox = new GridBagConstraints();
    gbc_HohUsernameTextbox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohUsernameTextbox.gridx = 1;
    gbc_HohUsernameTextbox.gridy = 0;
    mypanel.add(myHoHUrlTextField, gbc_HohUsernameTextbox);
    myHoHUrlTextField.setColumns(10);

    JLabel lblEncoding = new JLabel("Encoding");
    GridBagConstraints gbc_lblEncoding = new GridBagConstraints();
    gbc_lblEncoding.insets = new Insets(0, 0, 5, 5);
    gbc_lblEncoding.gridx = 0;
    gbc_lblEncoding.gridy = 3;
    add(lblEncoding, gbc_lblEncoding);

    JPanel encodingPanel = new JPanel();
    GridBagConstraints gbc_encodingPanel = new GridBagConstraints();
    gbc_encodingPanel.fill = GridBagConstraints.HORIZONTAL;
    gbc_encodingPanel.insets = new Insets(0, 0, 5, 0);
    gbc_encodingPanel.gridx = 1;
    gbc_encodingPanel.gridy = 3;
    add(encodingPanel, gbc_encodingPanel);
    encodingPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagLayout gbl_encodingPanel = new GridBagLayout();
    gbl_encodingPanel.columnWidths = new int[] { 144, 58, 0 };
    gbl_encodingPanel.rowHeights = new int[] { 23, 0 };
    gbl_encodingPanel.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
    gbl_encodingPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    encodingPanel.setLayout(gbl_encodingPanel);

    myXmlRadio = new JRadioButton("XML");
    myXmlRadio.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent theE) {
            updateEncodingModel();
        }
    });

    myEr7Radio = new JRadioButton("ER7 (Pipe and hat)");
    myEr7Radio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updateEncodingModel();
        }
    });
    encodingButtonGroup.add(myEr7Radio);
    GridBagConstraints gbc_Er7Radio = new GridBagConstraints();
    gbc_Er7Radio.anchor = GridBagConstraints.NORTHWEST;
    gbc_Er7Radio.insets = new Insets(0, 0, 0, 5);
    gbc_Er7Radio.gridx = 0;
    gbc_Er7Radio.gridy = 0;
    encodingPanel.add(myEr7Radio, gbc_Er7Radio);
    encodingButtonGroup.add(myXmlRadio);
    GridBagConstraints gbc_XmlRadio = new GridBagConstraints();
    gbc_XmlRadio.anchor = GridBagConstraints.NORTHWEST;
    gbc_XmlRadio.gridx = 1;
    gbc_XmlRadio.gridy = 0;
    encodingPanel.add(myXmlRadio, gbc_XmlRadio);

    JLabel lblCharset = new JLabel("Charset");
    GridBagConstraints gbc_lblCharset = new GridBagConstraints();
    gbc_lblCharset.insets = new Insets(0, 0, 5, 5);
    gbc_lblCharset.gridx = 0;
    gbc_lblCharset.gridy = 4;
    add(lblCharset, gbc_lblCharset);

    JPanel panel_2 = new JPanel();
    GridBagConstraints gbc_panel_2 = new GridBagConstraints();
    gbc_panel_2.fill = GridBagConstraints.HORIZONTAL;
    gbc_panel_2.insets = new Insets(0, 0, 5, 0);
    gbc_panel_2.gridx = 1;
    gbc_panel_2.gridy = 4;
    add(panel_2, gbc_panel_2);
    panel_2.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagLayout gbl_panel_2 = new GridBagLayout();
    gbl_panel_2.columnWidths = new int[] { 28, 198, 0, 0 };
    gbl_panel_2.rowHeights = new int[] { 27, 0 };
    gbl_panel_2.columnWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    gbl_panel_2.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel_2.setLayout(gbl_panel_2);

    myCharsetSelectRadio = new JRadioButton("");
    myCharsetSelectRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updateCharsetModel();
        }
    });
    charsetButtonGroup.add(myCharsetSelectRadio);
    GridBagConstraints gbc_CharsetSelectRadio = new GridBagConstraints();
    gbc_CharsetSelectRadio.anchor = GridBagConstraints.WEST;
    gbc_CharsetSelectRadio.insets = new Insets(0, 0, 0, 5);
    gbc_CharsetSelectRadio.gridx = 0;
    gbc_CharsetSelectRadio.gridy = 0;
    panel_2.add(myCharsetSelectRadio, gbc_CharsetSelectRadio);

    myCharsetCombo = new JComboBox();
    myCharsetCombo.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updateCharsetModel();
        }
    });
    GridBagConstraints gbc_CharsetCombo = new GridBagConstraints();
    gbc_CharsetCombo.anchor = GridBagConstraints.NORTHWEST;
    gbc_CharsetCombo.insets = new Insets(0, 0, 0, 5);
    gbc_CharsetCombo.gridx = 1;
    gbc_CharsetCombo.gridy = 0;
    panel_2.add(myCharsetCombo, gbc_CharsetCombo);

    myCharsetDetectRadio = new JRadioButton("Detect in Message (MSH-18)");
    myCharsetDetectRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updateCharsetModel();
        }
    });
    charsetButtonGroup.add(myCharsetDetectRadio);
    GridBagConstraints gbc_CharsetDetectRadio = new GridBagConstraints();
    gbc_CharsetDetectRadio.anchor = GridBagConstraints.NORTH;
    gbc_CharsetDetectRadio.gridwidth = 2;
    gbc_CharsetDetectRadio.gridx = 2;
    gbc_CharsetDetectRadio.gridy = 0;
    panel_2.add(myCharsetDetectRadio, gbc_CharsetDetectRadio);

    mylabel_5 = new JLabel("Debug");
    GridBagConstraints gbc_label_5 = new GridBagConstraints();
    gbc_label_5.insets = new Insets(0, 0, 5, 5);
    gbc_label_5.gridx = 0;
    gbc_label_5.gridy = 5;
    add(mylabel_5, gbc_label_5);

    mypanel_2 = new JPanel();
    mypanel_2.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel_75 = new GridBagConstraints();
    gbc_panel_75.insets = new Insets(0, 0, 5, 0);
    gbc_panel_75.fill = GridBagConstraints.BOTH;
    gbc_panel_75.gridx = 1;
    gbc_panel_75.gridy = 5;
    add(mypanel_2, gbc_panel_75);
    GridBagLayout gbl_panel_74 = new GridBagLayout();
    gbl_panel_74.columnWidths = new int[] { 0, 0 };
    gbl_panel_74.rowHeights = new int[] { 0, 0 };
    gbl_panel_74.columnWeights = new double[] { 0.0, Double.MIN_VALUE };
    gbl_panel_74.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    mypanel_2.setLayout(gbl_panel_74);

    myCaptureByteStreamCheckbox = new JCheckBox("Capture Bytes");
    GridBagConstraints gbc_CaptureByteStreamCheckbox = new GridBagConstraints();
    gbc_CaptureByteStreamCheckbox.gridx = 0;
    gbc_CaptureByteStreamCheckbox.gridy = 0;
    mypanel_2.add(myCaptureByteStreamCheckbox, gbc_CaptureByteStreamCheckbox);
    myCaptureByteStreamCheckbox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            myConnection.setCaptureBytes(myCaptureByteStreamCheckbox.isSelected());
        }
    });
    myCaptureByteStreamCheckbox.setToolTipText("Check this box to capture the transport level communication");

    myInterfaceTypeCardPanel = new JPanel();
    myInterfaceTypeCardPanel.setBorder(null);
    GridBagConstraints gbc_InterfaceTypeCardPanel = new GridBagConstraints();
    gbc_InterfaceTypeCardPanel.gridwidth = 2;
    gbc_InterfaceTypeCardPanel.fill = GridBagConstraints.BOTH;
    gbc_InterfaceTypeCardPanel.gridx = 0;
    gbc_InterfaceTypeCardPanel.gridy = 6;
    add(myInterfaceTypeCardPanel, gbc_InterfaceTypeCardPanel);
    myInterfaceTypeCardPanel.setLayout(new CardLayout(0, 0));

    myMllpCard = new JPanel();
    myMllpCard.setBorder(null);
    myInterfaceTypeCardPanel.add(myMllpCard, IFACE_TYPE_CARD_MLLP);
    GridBagLayout gbl_MllpCard = new GridBagLayout();
    gbl_MllpCard.columnWidths = new int[] { 150, 0, 0 };
    gbl_MllpCard.rowHeights = new int[] { 0, 0, 0, 0 };
    gbl_MllpCard.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE };
    gbl_MllpCard.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    myMllpCard.setLayout(gbl_MllpCard);

    JLabel lblHost = new JLabel("Host");
    GridBagConstraints gbc_lblHost = new GridBagConstraints();
    gbc_lblHost.insets = new Insets(0, 0, 5, 5);
    gbc_lblHost.gridx = 0;
    gbc_lblHost.gridy = 0;
    myMllpCard.add(lblHost, gbc_lblHost);

    mypanel_1 = new JPanel();
    mypanel_1.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel_1 = new GridBagConstraints();
    gbc_panel_1.insets = new Insets(0, 0, 5, 0);
    gbc_panel_1.fill = GridBagConstraints.BOTH;
    gbc_panel_1.gridx = 1;
    gbc_panel_1.gridy = 0;
    myMllpCard.add(mypanel_1, gbc_panel_1);
    GridBagLayout gbl_panel_1 = new GridBagLayout();
    gbl_panel_1.columnWidths = new int[] { 134, 0 };
    gbl_panel_1.rowHeights = new int[] { 28, 0 };
    gbl_panel_1.columnWeights = new double[] { 1.0, Double.MIN_VALUE };
    gbl_panel_1.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    mypanel_1.setLayout(gbl_panel_1);

    myHostBox = new JTextField();
    GridBagConstraints gbc_HostBox = new GridBagConstraints();
    gbc_HostBox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HostBox.anchor = GridBagConstraints.NORTH;
    gbc_HostBox.gridx = 0;
    gbc_HostBox.gridy = 0;
    mypanel_1.add(myHostBox, gbc_HostBox);
    myHostBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHost(myHostBox.getText());
        }
    });
    myHostBox.setColumns(10);

    JLabel lblTransport = new JLabel("Transport");
    GridBagConstraints gbc_lblTransport = new GridBagConstraints();
    gbc_lblTransport.insets = new Insets(0, 0, 5, 5);
    gbc_lblTransport.gridx = 0;
    gbc_lblTransport.gridy = 1;
    myMllpCard.add(lblTransport, gbc_lblTransport);

    JPanel panel_3 = new JPanel();
    GridBagConstraints gbc_hohAuthPanel = new GridBagConstraints();
    gbc_hohAuthPanel.fill = GridBagConstraints.HORIZONTAL;
    gbc_hohAuthPanel.insets = new Insets(0, 0, 5, 0);
    gbc_hohAuthPanel.gridx = 1;
    gbc_hohAuthPanel.gridy = 1;
    myMllpCard.add(panel_3, gbc_hohAuthPanel);
    panel_3.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagLayout gbl_hohAuthPanel = new GridBagLayout();
    gbl_hohAuthPanel.columnWidths = new int[] { 0, 0, 0 };
    gbl_hohAuthPanel.rowHeights = new int[] { 0, 0 };
    gbl_hohAuthPanel.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
    gbl_hohAuthPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel_3.setLayout(gbl_hohAuthPanel);

    myTlsCheckbox = new JCheckBox("Use TLS/SSL");
    myTlsCheckbox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            myHohTlsCheckbox.setSelected(myTlsCheckbox.isSelected());
            myConnection.setTls(myTlsCheckbox.isSelected());
        }
    });
    GridBagConstraints gbc_TlsCheckbox = new GridBagConstraints();
    gbc_TlsCheckbox.insets = new Insets(0, 0, 0, 5);
    gbc_TlsCheckbox.anchor = GridBagConstraints.WEST;
    gbc_TlsCheckbox.gridx = 0;
    gbc_TlsCheckbox.gridy = 0;
    panel_3.add(myTlsCheckbox, gbc_TlsCheckbox);

    myHoHCard = new JPanel();
    myInterfaceTypeCardPanel.add(myHoHCard, IFACE_TYPE_CARD_HOH);
    GridBagLayout gbl_HoHCard = new GridBagLayout();
    gbl_HoHCard.columnWidths = new int[] { 150, 0, 0 };
    gbl_HoHCard.rowHeights = new int[] { 0, 0, 0, 0 };
    gbl_HoHCard.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE };
    gbl_HoHCard.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    myHoHCard.setLayout(gbl_HoHCard);

    mylabel_6 = new JLabel("Authorization");
    GridBagConstraints gbc_label_6 = new GridBagConstraints();
    gbc_label_6.insets = new Insets(0, 0, 5, 5);
    gbc_label_6.gridx = 0;
    gbc_label_6.gridy = 0;
    myHoHCard.add(mylabel_6, gbc_label_6);

    hohAuthPanel = new JPanel();
    hohAuthPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_hohAuthPanel2 = new GridBagConstraints();
    gbc_hohAuthPanel2.insets = new Insets(0, 0, 5, 0);
    gbc_hohAuthPanel2.fill = GridBagConstraints.BOTH;
    gbc_hohAuthPanel2.gridx = 1;
    gbc_hohAuthPanel2.gridy = 0;
    myHoHCard.add(hohAuthPanel, gbc_hohAuthPanel2);
    GridBagLayout gbl_hohAuthPanel3 = new GridBagLayout();
    gbl_hohAuthPanel3.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 0 };
    gbl_hohAuthPanel3.rowHeights = new int[] { 0, 0 };
    gbl_hohAuthPanel3.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE };
    gbl_hohAuthPanel3.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    hohAuthPanel.setLayout(gbl_hohAuthPanel3);

    myHohAuthEnabledCheckbox = new JCheckBox("Enabled");
    myHohAuthEnabledCheckbox.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent theE) {
            myConnection.setHohAuthenticationEnabled(myHohAuthEnabledCheckbox.isSelected());
        }
    });
    GridBagConstraints gbc_HohAuthEnabledCheckbox = new GridBagConstraints();
    gbc_HohAuthEnabledCheckbox.insets = new Insets(0, 0, 0, 5);
    gbc_HohAuthEnabledCheckbox.gridx = 0;
    gbc_HohAuthEnabledCheckbox.gridy = 0;
    hohAuthPanel.add(myHohAuthEnabledCheckbox, gbc_HohAuthEnabledCheckbox);

    mylabel_7 = new JLabel("Username:");
    GridBagConstraints gbc_label_7 = new GridBagConstraints();
    gbc_label_7.insets = new Insets(0, 0, 0, 5);
    gbc_label_7.anchor = GridBagConstraints.EAST;
    gbc_label_7.gridx = 1;
    gbc_label_7.gridy = 0;
    hohAuthPanel.add(mylabel_7, gbc_label_7);

    myHohAuthUsernameTextbox = new JTextField();
    myHohAuthUsernameTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohAuthenticationUsername(myHohAuthUsernameTextbox.getText());
        }
    });
    myHohAuthUsernameTextbox.setMaximumSize(new Dimension(200, 2147483647));
    myHohAuthUsernameTextbox.setMinimumSize(new Dimension(100, 28));
    myHohAuthUsernameTextbox.setPreferredSize(new Dimension(100, 28));
    GridBagConstraints gbc_HohUsernameTextbox2 = new GridBagConstraints();
    gbc_HohUsernameTextbox2.insets = new Insets(0, 0, 0, 5);
    gbc_HohUsernameTextbox2.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohUsernameTextbox2.gridx = 2;
    gbc_HohUsernameTextbox2.gridy = 0;
    hohAuthPanel.add(myHohAuthUsernameTextbox, gbc_HohUsernameTextbox2);
    myHohAuthUsernameTextbox.setColumns(10);

    mylabel_8 = new JLabel("Password:");
    GridBagConstraints gbc_label_8 = new GridBagConstraints();
    gbc_label_8.insets = new Insets(0, 0, 0, 5);
    gbc_label_8.anchor = GridBagConstraints.EAST;
    gbc_label_8.gridx = 3;
    gbc_label_8.gridy = 0;
    hohAuthPanel.add(mylabel_8, gbc_label_8);

    myHohAuthPasswordTextbox = new JTextField();
    myHohAuthPasswordTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohAuthenticationPassword(myHohAuthPasswordTextbox.getText());
        }
    });
    myHohAuthPasswordTextbox.setPreferredSize(new Dimension(100, 28));
    myHohAuthPasswordTextbox.setMaximumSize(new Dimension(200, 2147483647));
    myHohAuthPasswordTextbox.setMinimumSize(new Dimension(100, 28));
    GridBagConstraints gbc_HohSignatureKeystoreTextbox = new GridBagConstraints();
    gbc_HohSignatureKeystoreTextbox.insets = new Insets(0, 0, 0, 5);
    gbc_HohSignatureKeystoreTextbox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeystoreTextbox.gridx = 4;
    gbc_HohSignatureKeystoreTextbox.gridy = 0;
    hohAuthPanel.add(myHohAuthPasswordTextbox, gbc_HohSignatureKeystoreTextbox);
    myHohAuthPasswordTextbox.setColumns(10);

    mylabel_2 = new JLabel("Security Profile");
    mylabel_2.setVerticalTextPosition(SwingConstants.TOP);
    mylabel_2.setVerticalAlignment(SwingConstants.TOP);
    GridBagConstraints gbc_label_2 = new GridBagConstraints();
    gbc_label_2.insets = new Insets(0, 0, 5, 5);
    gbc_label_2.gridx = 0;
    gbc_label_2.gridy = 1;
    myHoHCard.add(mylabel_2, gbc_label_2);

    // securityProfilePanel = new JPanel();
    GridBagConstraints gbc_securityProfilePanel = new GridBagConstraints();
    gbc_securityProfilePanel.insets = new Insets(0, 0, 5, 0);
    gbc_securityProfilePanel.fill = GridBagConstraints.BOTH;
    gbc_securityProfilePanel.gridx = 1;
    gbc_securityProfilePanel.gridy = 1;
    // myHoHCard.add(securityProfilePanel, gbc_securityProfilePanel);
    // securityProfilePanel.setLayout(new BorderLayout(0, 0));

    tlsKeystorePanel = new JPanel();
    tlsKeystorePanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    // securityProfilePanel.add(tlsKeystorePanel, BorderLayout.CENTER);
    myHoHCard.add(tlsKeystorePanel, gbc_securityProfilePanel);
    GridBagLayout gbl_tlsKeystorePanel = new GridBagLayout();
    gbl_tlsKeystorePanel.columnWidths = new int[] { 0, 58, 107, 77, 0, 0 };
    gbl_tlsKeystorePanel.rowHeights = new int[] { 28, 16, 0, 0 };
    gbl_tlsKeystorePanel.columnWeights = new double[] { 0.0, 0.0, 1.0, 1.0, 0.0, Double.MIN_VALUE };
    gbl_tlsKeystorePanel.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    tlsKeystorePanel.setLayout(gbl_tlsKeystorePanel);

    myHohTlsCheckbox = new JCheckBox("TLS Enabled");
    GridBagConstraints gbc_HohTlsCheckbox = new GridBagConstraints();
    gbc_HohTlsCheckbox.gridheight = 2;
    gbc_HohTlsCheckbox.insets = new Insets(0, 0, 5, 5);
    gbc_HohTlsCheckbox.gridx = 0;
    gbc_HohTlsCheckbox.gridy = 0;
    tlsKeystorePanel.add(myHohTlsCheckbox, gbc_HohTlsCheckbox);
    myHohTlsCheckbox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            myConnection.setTls(myHohTlsCheckbox.isSelected());
            myTlsCheckbox.setSelected(myHohTlsCheckbox.isSelected());
            updatePortsUi();
        }
    });

    mylabel_3 = new JLabel("Keystore:");
    GridBagConstraints gbc_label_3 = new GridBagConstraints();
    gbc_label_3.anchor = GridBagConstraints.WEST;
    gbc_label_3.fill = GridBagConstraints.VERTICAL;
    gbc_label_3.insets = new Insets(0, 0, 5, 5);
    gbc_label_3.gridx = 1;
    gbc_label_3.gridy = 0;
    tlsKeystorePanel.add(mylabel_3, gbc_label_3);

    myHohSecurityKeystoreTextbox = new JTextField();
    GridBagConstraints gbc_HohKeystoreTextbox = new GridBagConstraints();
    gbc_HohKeystoreTextbox.gridwidth = 2;
    gbc_HohKeystoreTextbox.anchor = GridBagConstraints.NORTH;
    gbc_HohKeystoreTextbox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohKeystoreTextbox.insets = new Insets(0, 0, 5, 5);
    gbc_HohKeystoreTextbox.gridx = 2;
    gbc_HohKeystoreTextbox.gridy = 0;
    tlsKeystorePanel.add(myHohSecurityKeystoreTextbox, gbc_HohKeystoreTextbox);
    myHohSecurityKeystoreTextbox.setColumns(10);
    myHohSecurityKeystoreTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            String text = myHohSecurityKeystoreTextbox.getText();
            myHohSecurityKeyPwTextBox.setEnabled(isNotBlank(text));
            myConnection.setTlsKeystoreLocation(text);
        }
    });

    myHohSecurityKeystoreChooseBtn = new JButton("Choose");
    myHohSecurityKeystoreChooseBtn.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            Hl7ConnectionPanel.chooseKeystore(Hl7ConnectionPanel.this, myHohSecurityKeystoreTextbox);
        }
    });
    myHohSecurityKeystoreChooseBtn.setIcon(
            new ImageIcon(Hl7ConnectionPanel.class.getResource("/ca/uhn/hl7v2/testpanel/images/open.png")));
    GridBagConstraints gbc_HohSignatureKeystoreChooseButton = new GridBagConstraints();
    gbc_HohSignatureKeystoreChooseButton.insets = new Insets(0, 0, 5, 0);
    gbc_HohSignatureKeystoreChooseButton.gridx = 4;
    gbc_HohSignatureKeystoreChooseButton.gridy = 0;
    tlsKeystorePanel.add(myHohSecurityKeystoreChooseBtn, gbc_HohSignatureKeystoreChooseButton);

    mylabel_4 = new JLabel("Store Pass:");
    GridBagConstraints gbc_label_4 = new GridBagConstraints();
    gbc_label_4.insets = new Insets(0, 0, 0, 5);
    gbc_label_4.anchor = GridBagConstraints.EAST;
    gbc_label_4.gridx = 1;
    gbc_label_4.gridy = 1;
    tlsKeystorePanel.add(mylabel_4, gbc_label_4);

    myHohSecurityKeyPwTextBox = new JTextField();
    myHohSecurityKeyPwTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setTlsKeystorePassword(myHohSecurityKeyPwTextBox.getText());
        }
    });
    GridBagConstraints gbc_HohSecurityKeyPwTextBox = new GridBagConstraints();
    gbc_HohSecurityKeyPwTextBox.insets = new Insets(0, 0, 0, 5);
    gbc_HohSecurityKeyPwTextBox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSecurityKeyPwTextBox.gridx = 2;
    gbc_HohSecurityKeyPwTextBox.gridy = 1;
    tlsKeystorePanel.add(myHohSecurityKeyPwTextBox, gbc_HohSecurityKeyPwTextBox);
    myHohSecurityKeyPwTextBox.setColumns(10);

    myHohSecurityProfileKeystoreStatus = new JLabel("Value goes here");
    myHohSecurityProfileKeystoreStatus.setHorizontalAlignment(SwingConstants.CENTER);
    GridBagConstraints gbc_HohSecurityProfileKeystoreStatus = new GridBagConstraints();
    gbc_HohSecurityProfileKeystoreStatus.anchor = GridBagConstraints.NORTH;
    gbc_HohSecurityProfileKeystoreStatus.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSecurityProfileKeystoreStatus.gridwidth = 5;
    gbc_HohSecurityProfileKeystoreStatus.gridx = 0;
    gbc_HohSecurityProfileKeystoreStatus.gridy = 2;
    tlsKeystorePanel.add(myHohSecurityProfileKeystoreStatus, gbc_HohSecurityProfileKeystoreStatus);

    mylabel_9 = new JLabel("Signature Profile");
    GridBagConstraints gbc_label_9 = new GridBagConstraints();
    gbc_label_9.insets = new Insets(0, 0, 0, 5);
    gbc_label_9.gridx = 0;
    gbc_label_9.gridy = 2;
    myHoHCard.add(mylabel_9, gbc_label_9);

    mypanel_3 = new JPanel();
    mypanel_3.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel_3 = new GridBagConstraints();
    gbc_panel_3.fill = GridBagConstraints.BOTH;
    gbc_panel_3.gridx = 1;
    gbc_panel_3.gridy = 2;
    myHoHCard.add(mypanel_3, gbc_panel_3);
    GridBagLayout gbl_panel_3 = new GridBagLayout();
    gbl_panel_3.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 50, 0, 0 };
    gbl_panel_3.rowHeights = new int[] { 0, 0, 0, 0 };
    gbl_panel_3.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };
    gbl_panel_3.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    mypanel_3.setLayout(gbl_panel_3);

    myHohSignatureEnabled = new JCheckBox("Enabled");
    myHohSignatureEnabled.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent theE) {
            myConnection.setHohSignatureEnabled(myHohSignatureEnabled.isSelected());
        }
    });
    GridBagConstraints gbc_HohSignatureEnabled = new GridBagConstraints();
    gbc_HohSignatureEnabled.insets = new Insets(0, 0, 5, 5);
    gbc_HohSignatureEnabled.gridx = 0;
    gbc_HohSignatureEnabled.gridy = 0;
    mypanel_3.add(myHohSignatureEnabled, gbc_HohSignatureEnabled);

    mylabel_10 = new JLabel("Keystore:");
    GridBagConstraints gbc_label_10 = new GridBagConstraints();
    gbc_label_10.anchor = GridBagConstraints.EAST;
    gbc_label_10.insets = new Insets(0, 0, 5, 5);
    gbc_label_10.gridx = 1;
    gbc_label_10.gridy = 0;
    mypanel_3.add(mylabel_10, gbc_label_10);

    myHohSignatureKeystoreTextbox = new JTextField();
    myHohSignatureKeystoreTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohSignatureKeystore(myHohSignatureKeystoreTextbox.getText());
        }
    });
    GridBagConstraints gbc_HohSignatureKeystoreTextbox2 = new GridBagConstraints();
    gbc_HohSignatureKeystoreTextbox2.gridwidth = 5;
    gbc_HohSignatureKeystoreTextbox2.insets = new Insets(0, 0, 5, 5);
    gbc_HohSignatureKeystoreTextbox2.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeystoreTextbox2.gridx = 2;
    gbc_HohSignatureKeystoreTextbox2.gridy = 0;
    mypanel_3.add(myHohSignatureKeystoreTextbox, gbc_HohSignatureKeystoreTextbox2);
    myHohSignatureKeystoreTextbox.setColumns(10);

    myHohSignatureKeystoreChooseButton = new JButton("Choose");
    myHohSignatureKeystoreChooseButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            Hl7ConnectionPanel.chooseKeystore(Hl7ConnectionPanel.this, myHohSignatureKeystoreTextbox);
        }
    });
    myHohSignatureKeystoreChooseButton.setIcon(
            new ImageIcon(Hl7ConnectionPanel.class.getResource("/ca/uhn/hl7v2/testpanel/images/open.png")));
    GridBagConstraints gbc_HohSignatureKeystoreChooseButton2 = new GridBagConstraints();
    gbc_HohSignatureKeystoreChooseButton2.insets = new Insets(0, 0, 5, 0);
    gbc_HohSignatureKeystoreChooseButton2.gridx = 7;
    gbc_HohSignatureKeystoreChooseButton2.gridy = 0;
    mypanel_3.add(myHohSignatureKeystoreChooseButton, gbc_HohSignatureKeystoreChooseButton2);

    mylabel_11 = new JLabel("Store Pass:");
    GridBagConstraints gbc_label_11 = new GridBagConstraints();
    gbc_label_11.anchor = GridBagConstraints.EAST;
    gbc_label_11.insets = new Insets(0, 0, 5, 5);
    gbc_label_11.gridx = 1;
    gbc_label_11.gridy = 1;
    mypanel_3.add(mylabel_11, gbc_label_11);

    myHohSignatureKeystorePasswordTextbox = new JTextField();
    myHohSignatureKeystorePasswordTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohSignatureKeystorePassword(myHohSignatureKeystorePasswordTextbox.getText());
        }
    });
    myHohSignatureKeystorePasswordTextbox.setPreferredSize(new Dimension(100, 28));
    myHohSignatureKeystorePasswordTextbox.setMinimumSize(new Dimension(100, 28));
    myHohSignatureKeystorePasswordTextbox.setMaximumSize(new Dimension(200, 2147483647));
    GridBagConstraints gbc_HohSignatureKeystorePasswordTextbox = new GridBagConstraints();
    gbc_HohSignatureKeystorePasswordTextbox.insets = new Insets(0, 0, 5, 5);
    gbc_HohSignatureKeystorePasswordTextbox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeystorePasswordTextbox.gridx = 2;
    gbc_HohSignatureKeystorePasswordTextbox.gridy = 1;
    mypanel_3.add(myHohSignatureKeystorePasswordTextbox, gbc_HohSignatureKeystorePasswordTextbox);
    myHohSignatureKeystorePasswordTextbox.setColumns(10);

    mylabel_12 = new JLabel("Key:");
    GridBagConstraints gbc_label_12 = new GridBagConstraints();
    gbc_label_12.anchor = GridBagConstraints.EAST;
    gbc_label_12.insets = new Insets(0, 0, 5, 5);
    gbc_label_12.gridx = 3;
    gbc_label_12.gridy = 1;
    mypanel_3.add(mylabel_12, gbc_label_12);

    myHohSignatureKeyAliasCombo = new JComboBox();
    myHohSignatureKeyAliasCombo.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent theE) {
            if (myUpdatingHohSignatureKeyAliasCombo) {
                return;
            }
            String selection = (String) myHohSignatureKeyAliasCombo.getSelectedItem();
            if (selection == HOH_SIGNATURE_KEY_USE_ANY_AVAILABLE) {
                myConnection.setHohSignatureKey(null);
            } else {
                myConnection.setHohSignatureKey(selection.replaceAll(" .*", ""));
            }
        }
    });
    GridBagConstraints gbc_HohSignatureKeyAliasCombo = new GridBagConstraints();
    gbc_HohSignatureKeyAliasCombo.insets = new Insets(0, 0, 5, 5);
    gbc_HohSignatureKeyAliasCombo.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeyAliasCombo.gridx = 4;
    gbc_HohSignatureKeyAliasCombo.gridy = 1;
    mypanel_3.add(myHohSignatureKeyAliasCombo, gbc_HohSignatureKeyAliasCombo);

    mylabel_13 = new JLabel("Key Pass:");
    GridBagConstraints gbc_label_13 = new GridBagConstraints();
    gbc_label_13.anchor = GridBagConstraints.EAST;
    gbc_label_13.insets = new Insets(0, 0, 5, 5);
    gbc_label_13.gridx = 5;
    gbc_label_13.gridy = 1;
    mypanel_3.add(mylabel_13, gbc_label_13);

    myHohSignatureKeyPass = new JTextField();
    myHohSignatureKeyPass.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohSignatureKeyPassword(myHohSignatureKeyPass.getText());
        }
    });
    myHohSignatureKeyPass.setMinimumSize(new Dimension(50, 28));
    myHohSignatureKeyPass.setMaximumSize(new Dimension(50, 2147483647));
    myHohSignatureKeyPass.setPreferredSize(new Dimension(50, 28));
    GridBagConstraints gbc_HohSignatureKeyPass = new GridBagConstraints();
    gbc_HohSignatureKeyPass.gridwidth = 2;
    gbc_HohSignatureKeyPass.insets = new Insets(0, 0, 5, 0);
    gbc_HohSignatureKeyPass.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeyPass.gridx = 6;
    gbc_HohSignatureKeyPass.gridy = 1;
    mypanel_3.add(myHohSignatureKeyPass, gbc_HohSignatureKeyPass);
    myHohSignatureKeyPass.setColumns(10);

    myHohSignatureStatusLabel = new JLabel("New label");
    myHohSignatureStatusLabel.setHorizontalAlignment(SwingConstants.CENTER);
    GridBagConstraints gbc_HohSignatureStatusLabel = new GridBagConstraints();
    gbc_HohSignatureStatusLabel.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureStatusLabel.gridwidth = 8;
    gbc_HohSignatureStatusLabel.insets = new Insets(0, 0, 0, 5);
    gbc_HohSignatureStatusLabel.gridx = 0;
    gbc_HohSignatureStatusLabel.gridy = 2;
    mypanel_3.add(myHohSignatureStatusLabel, gbc_HohSignatureStatusLabel);

    init();

}

From source file:edu.harvard.mcz.imagecapture.VerbatimClassifyDialog.java

protected void init() {
    setTitle("Interpret verbatim data into fields.");
    setBounds(100, 100, 1203, 899);/*from  w w  w.j ava2s  . c o  m*/
    getContentPane().setLayout(new BorderLayout());
    contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
    getContentPane().add(contentPanel, BorderLayout.CENTER);
    contentPanel.setLayout(new BoxLayout(contentPanel, BoxLayout.Y_AXIS));
    {
        JPanel panelVerbatimValues = new JPanel();
        contentPanel.add(panelVerbatimValues);
        GridBagLayout gbl_panelVerbatimValues = new GridBagLayout();
        gbl_panelVerbatimValues.columnWidths = new int[] { 70, 0, 0, 0, 35, 0, 58, 0, 0, 0 };
        gbl_panelVerbatimValues.rowHeights = new int[] { 15, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                83, 0 };
        gbl_panelVerbatimValues.columnWeights = new double[] { 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0,
                1.0 };
        gbl_panelVerbatimValues.rowWeights = new double[] { 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE };
        panelVerbatimValues.setLayout(gbl_panelVerbatimValues);
        {
            lblCount = new JLabel("New label");
            GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();
            gbc_lblNewLabel.gridwidth = 2;
            gbc_lblNewLabel.insets = new Insets(0, 0, 5, 5);
            gbc_lblNewLabel.anchor = GridBagConstraints.SOUTHWEST;
            gbc_lblNewLabel.gridx = 0;
            gbc_lblNewLabel.gridy = 0;
            panelVerbatimValues.add(lblCount, gbc_lblNewLabel);
        }

        JButton buttonFillFromLast = new JButton("Fill From Last");
        GridBagConstraints gbc_buttonFillFromLast = new GridBagConstraints();
        gbc_buttonFillFromLast.anchor = GridBagConstraints.SOUTH;
        gbc_buttonFillFromLast.insets = new Insets(0, 0, 5, 5);
        gbc_buttonFillFromLast.gridx = 3;
        gbc_buttonFillFromLast.gridy = 0;
        panelVerbatimValues.add(buttonFillFromLast, gbc_buttonFillFromLast);
        {
            JLabel lblNewLabel_1 = new JLabel("Field values to apply to all records.");
            GridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();
            gbc_lblNewLabel_1.anchor = GridBagConstraints.SOUTHEAST;
            gbc_lblNewLabel_1.gridwidth = 4;
            gbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 5);
            gbc_lblNewLabel_1.gridx = 4;
            gbc_lblNewLabel_1.gridy = 0;
            panelVerbatimValues.add(lblNewLabel_1, gbc_lblNewLabel_1);
        }
        {
            JLabel lblNewLabel_2 = new JLabel("Verbatim Locality");
            GridBagConstraints gbc_lblNewLabel_2 = new GridBagConstraints();
            gbc_lblNewLabel_2.anchor = GridBagConstraints.EAST;
            gbc_lblNewLabel_2.insets = new Insets(0, 0, 5, 5);
            gbc_lblNewLabel_2.gridx = 0;
            gbc_lblNewLabel_2.gridy = 1;
            panelVerbatimValues.add(lblNewLabel_2, gbc_lblNewLabel_2);
        }
        {
            textFieldVerbLocality = new JTextArea();
            textFieldVerbLocality.setEditable(false);
            textFieldVerbLocality.setRows(5);
            GridBagConstraints gbc_textField = new GridBagConstraints();
            gbc_textField.gridheight = 3;
            gbc_textField.insets = new Insets(0, 0, 5, 5);
            gbc_textField.fill = GridBagConstraints.BOTH;
            gbc_textField.gridx = 1;
            gbc_textField.gridy = 1;
            panelVerbatimValues.add(textFieldVerbLocality, gbc_textField);
            textFieldVerbLocality.setColumns(30);
        }

        JLabel lblNewLabel = new JLabel("HigherGeography");
        GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();
        gbc_lblNewLabel.anchor = GridBagConstraints.EAST;
        gbc_lblNewLabel.insets = new Insets(0, 0, 5, 5);
        gbc_lblNewLabel.gridx = 3;
        gbc_lblNewLabel.gridy = 1;
        panelVerbatimValues.add(lblNewLabel, gbc_lblNewLabel);

        GridBagConstraints gbc_textFieldHigherGeography = new GridBagConstraints();
        gbc_textFieldHigherGeography.fill = GridBagConstraints.HORIZONTAL;
        gbc_textFieldHigherGeography.gridwidth = 5;
        gbc_textFieldHigherGeography.insets = new Insets(0, 0, 5, 5);
        gbc_textFieldHigherGeography.gridx = 4;
        gbc_textFieldHigherGeography.gridy = 1;
        panelVerbatimValues.add(getComboBoxHighGeog(), gbc_textFieldHigherGeography);

        JButton btnCopyLocality = new JButton(">");
        btnCopyLocality.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                if (textFieldSpecificLocality.getText().isEmpty()) {
                    textFieldSpecificLocality.setText(textFieldVerbLocality.getText().replace("\n", "").trim());
                }
            }
        });
        GridBagConstraints gbc_btnCopyLocality = new GridBagConstraints();
        gbc_btnCopyLocality.insets = new Insets(0, 0, 5, 5);
        gbc_btnCopyLocality.gridx = 2;
        gbc_btnCopyLocality.gridy = 2;
        panelVerbatimValues.add(btnCopyLocality, gbc_btnCopyLocality);

        JLabel lblSpecificLocality = new JLabel("Specific Locality");
        GridBagConstraints gbc_lblSpecificLocality = new GridBagConstraints();
        gbc_lblSpecificLocality.anchor = GridBagConstraints.EAST;
        gbc_lblSpecificLocality.insets = new Insets(0, 0, 5, 5);
        gbc_lblSpecificLocality.gridx = 3;
        gbc_lblSpecificLocality.gridy = 2;
        panelVerbatimValues.add(lblSpecificLocality, gbc_lblSpecificLocality);

        JLabel lblElevation = new JLabel("Elevation");
        GridBagConstraints gbc_lblElevation = new GridBagConstraints();
        gbc_lblElevation.anchor = GridBagConstraints.EAST;
        gbc_lblElevation.insets = new Insets(0, 0, 5, 5);
        gbc_lblElevation.gridx = 3;
        gbc_lblElevation.gridy = 3;
        panelVerbatimValues.add(lblElevation, gbc_lblElevation);

        textFieldMinElevation = new JTextField();
        textFieldMinElevation.setMinimumSize(new Dimension(60, 19));
        GridBagConstraints gbc_textFieldMinElevation = new GridBagConstraints();
        gbc_textFieldMinElevation.insets = new Insets(0, 0, 5, 5);
        gbc_textFieldMinElevation.fill = GridBagConstraints.HORIZONTAL;
        gbc_textFieldMinElevation.gridx = 4;
        gbc_textFieldMinElevation.gridy = 3;
        panelVerbatimValues.add(textFieldMinElevation, gbc_textFieldMinElevation);
        textFieldMinElevation.setColumns(4);

        JLabel lblTo = new JLabel("to");
        GridBagConstraints gbc_lblTo = new GridBagConstraints();
        gbc_lblTo.anchor = GridBagConstraints.EAST;
        gbc_lblTo.insets = new Insets(0, 0, 5, 5);
        gbc_lblTo.gridx = 5;
        gbc_lblTo.gridy = 3;
        panelVerbatimValues.add(lblTo, gbc_lblTo);

        textFieldMaxElevation = new JTextField();
        textFieldMaxElevation.setMinimumSize(new Dimension(60, 19));
        GridBagConstraints gbc_textFieldMaxElevation = new GridBagConstraints();
        gbc_textFieldMaxElevation.anchor = GridBagConstraints.WEST;
        gbc_textFieldMaxElevation.insets = new Insets(0, 0, 5, 5);
        gbc_textFieldMaxElevation.gridx = 6;
        gbc_textFieldMaxElevation.gridy = 3;
        panelVerbatimValues.add(textFieldMaxElevation, gbc_textFieldMaxElevation);
        textFieldMaxElevation.setColumns(5);

        comboBoxElevUnits = new JComboBox();
        GridBagConstraints gbc_comboBoxElevUnits = new GridBagConstraints();
        gbc_comboBoxElevUnits.insets = new Insets(0, 0, 5, 5);
        gbc_comboBoxElevUnits.fill = GridBagConstraints.HORIZONTAL;
        gbc_comboBoxElevUnits.gridx = 7;
        gbc_comboBoxElevUnits.gridy = 3;
        panelVerbatimValues.add(comboBoxElevUnits, gbc_comboBoxElevUnits);
        {
            JLabel lblVerbatimdate = new JLabel("VerbatimDate");
            GridBagConstraints gbc_lblVerbatimdate = new GridBagConstraints();
            gbc_lblVerbatimdate.anchor = GridBagConstraints.EAST;
            gbc_lblVerbatimdate.insets = new Insets(0, 0, 5, 5);
            gbc_lblVerbatimdate.gridx = 0;
            gbc_lblVerbatimdate.gridy = 4;
            panelVerbatimValues.add(lblVerbatimdate, gbc_lblVerbatimdate);
        }

        textFieldVerbDate = new JTextField();
        GridBagConstraints gbc_textFieldVerbDate = new GridBagConstraints();
        gbc_textFieldVerbDate.insets = new Insets(0, 0, 5, 5);
        gbc_textFieldVerbDate.fill = GridBagConstraints.HORIZONTAL;
        gbc_textFieldVerbDate.gridx = 1;
        gbc_textFieldVerbDate.gridy = 4;
        panelVerbatimValues.add(textFieldVerbDate, gbc_textFieldVerbDate);
        textFieldVerbDate.setColumns(30);

        JButton btnCopyDate = new JButton(">");
        btnCopyDate.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                if (textFieldISODate.getText().isEmpty()) {
                    Map<String, String> extractResult = DateUtils
                            .extractDateFromVerbatim(textFieldVerbDate.getText().trim());
                    if (extractResult.containsKey("result")) {
                        textFieldISODate.setText(extractResult.get("result"));
                    }
                    if (extractResult.containsKey("resultState")) {
                        // TODO: Report suspect etc
                    }
                }
            }
        });
        GridBagConstraints gbc_btnCopyDate = new GridBagConstraints();
        gbc_btnCopyDate.insets = new Insets(0, 0, 5, 5);
        gbc_btnCopyDate.gridx = 2;
        gbc_btnCopyDate.gridy = 4;
        panelVerbatimValues.add(btnCopyDate, gbc_btnCopyDate);

        JLabel lblNewLabel_3 = new JLabel("ISO Date");
        GridBagConstraints gbc_lblNewLabel_3 = new GridBagConstraints();
        gbc_lblNewLabel_3.anchor = GridBagConstraints.EAST;
        gbc_lblNewLabel_3.insets = new Insets(0, 0, 5, 5);
        gbc_lblNewLabel_3.gridx = 3;
        gbc_lblNewLabel_3.gridy = 4;
        panelVerbatimValues.add(lblNewLabel_3, gbc_lblNewLabel_3);

        textFieldISODate = new JTextField();
        textFieldISODate.setInputVerifier(
                MetadataRetriever.getInputVerifier(Specimen.class, "ISODate", textFieldISODate));
        textFieldISODate.setToolTipText(MetadataRetriever.getFieldHelp(Specimen.class, "ISODate"));
        GridBagConstraints gbc_textFieldISODate = new GridBagConstraints();
        gbc_textFieldISODate.fill = GridBagConstraints.HORIZONTAL;
        gbc_textFieldISODate.gridwidth = 5;
        gbc_textFieldISODate.insets = new Insets(0, 0, 5, 5);
        gbc_textFieldISODate.gridx = 4;
        gbc_textFieldISODate.gridy = 4;
        panelVerbatimValues.add(textFieldISODate, gbc_textFieldISODate);
        textFieldISODate.setColumns(10);

        textFieldSpecificLocality = new JTextField();
        GridBagConstraints gbc_textFieldSpecificLocality = new GridBagConstraints();
        gbc_textFieldSpecificLocality.gridwidth = 5;
        gbc_textFieldSpecificLocality.fill = GridBagConstraints.HORIZONTAL;
        gbc_textFieldSpecificLocality.insets = new Insets(0, 0, 5, 5);
        gbc_textFieldSpecificLocality.gridx = 4;
        gbc_textFieldSpecificLocality.gridy = 2;
        panelVerbatimValues.add(textFieldSpecificLocality, gbc_textFieldSpecificLocality);
        textFieldSpecificLocality.setColumns(25);
        {
            JLabel lblVerbatimCollector = new JLabel("Verbatim Collector");
            GridBagConstraints gbc_lblVerbatimCollector = new GridBagConstraints();
            gbc_lblVerbatimCollector.anchor = GridBagConstraints.EAST;
            gbc_lblVerbatimCollector.insets = new Insets(0, 0, 5, 5);
            gbc_lblVerbatimCollector.gridx = 0;
            gbc_lblVerbatimCollector.gridy = 6;
            panelVerbatimValues.add(lblVerbatimCollector, gbc_lblVerbatimCollector);
        }

        textFieldVerbCollector = new JTextArea();
        textFieldVerbCollector.setEditable(false);
        textFieldVerbCollector.setRows(3);
        GridBagConstraints gbc_textFieldVerbCollector = new GridBagConstraints();
        gbc_textFieldVerbCollector.gridheight = 2;
        gbc_textFieldVerbCollector.insets = new Insets(0, 0, 5, 5);
        gbc_textFieldVerbCollector.fill = GridBagConstraints.BOTH;
        gbc_textFieldVerbCollector.gridx = 1;
        gbc_textFieldVerbCollector.gridy = 6;
        panelVerbatimValues.add(textFieldVerbCollector, gbc_textFieldVerbCollector);
        textFieldVerbCollector.setColumns(30);

        JLabel lblCollectors = new JLabel("Collector(s)");
        GridBagConstraints gbc_lblCollectors = new GridBagConstraints();
        gbc_lblCollectors.anchor = GridBagConstraints.EAST;
        gbc_lblCollectors.insets = new Insets(0, 0, 5, 5);
        gbc_lblCollectors.gridx = 3;
        gbc_lblCollectors.gridy = 6;
        panelVerbatimValues.add(lblCollectors, gbc_lblCollectors);

        JButton btnAddCollector = new JButton("+");
        btnAddCollector.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent e) {
                ((CollectorTableModel) jTableCollectors.getModel()).addCollector(new Collector(null, ""));
            }
        });
        GridBagConstraints gbc_btnAddCollector = new GridBagConstraints();
        gbc_btnAddCollector.anchor = GridBagConstraints.EAST;
        gbc_btnAddCollector.insets = new Insets(0, 0, 5, 5);
        gbc_btnAddCollector.gridx = 3;
        gbc_btnAddCollector.gridy = 7;
        panelVerbatimValues.add(btnAddCollector, gbc_btnAddCollector);

        GridBagConstraints gbc_collectorTable = new GridBagConstraints();
        gbc_collectorTable.insets = new Insets(0, 0, 5, 5);
        gbc_collectorTable.fill = GridBagConstraints.BOTH;
        gbc_collectorTable.gridx = 4;
        gbc_collectorTable.gridy = 6;
        gbc_collectorTable.gridheight = 2;
        gbc_collectorTable.gridwidth = 5;
        panelVerbatimValues.add(getJScrollPaneCollectors(), gbc_collectorTable);

        JLabel lblVerbatimCollection = new JLabel("Verbatim Collection");
        GridBagConstraints gbc_lblVerbatimCollection = new GridBagConstraints();
        gbc_lblVerbatimCollection.anchor = GridBagConstraints.EAST;
        gbc_lblVerbatimCollection.insets = new Insets(0, 0, 5, 5);
        gbc_lblVerbatimCollection.gridx = 0;
        gbc_lblVerbatimCollection.gridy = 8;
        panelVerbatimValues.add(lblVerbatimCollection, gbc_lblVerbatimCollection);

        textFieldVerbCollection = new JTextArea();
        textFieldVerbCollection.setEditable(false);
        textFieldVerbCollection.setRows(3);
        GridBagConstraints gbc_textFieldVerbCollection = new GridBagConstraints();
        gbc_textFieldVerbCollection.gridheight = 2;
        gbc_textFieldVerbCollection.insets = new Insets(0, 0, 5, 5);
        gbc_textFieldVerbCollection.fill = GridBagConstraints.BOTH;
        gbc_textFieldVerbCollection.gridx = 1;
        gbc_textFieldVerbCollection.gridy = 8;
        panelVerbatimValues.add(textFieldVerbCollection, gbc_textFieldVerbCollection);
        textFieldVerbCollection.setColumns(30);

        JLabel lblCollection = new JLabel("Collection");
        GridBagConstraints gbc_lblCollection = new GridBagConstraints();
        gbc_lblCollection.anchor = GridBagConstraints.EAST;
        gbc_lblCollection.insets = new Insets(0, 0, 5, 5);
        gbc_lblCollection.gridx = 3;
        gbc_lblCollection.gridy = 8;
        panelVerbatimValues.add(lblCollection, gbc_lblCollection);

        GridBagConstraints gbc_textFieldCollection = new GridBagConstraints();
        gbc_textFieldCollection.fill = GridBagConstraints.HORIZONTAL;
        gbc_textFieldCollection.gridwidth = 5;
        gbc_textFieldCollection.insets = new Insets(0, 0, 5, 5);
        gbc_textFieldCollection.gridx = 4;
        gbc_textFieldCollection.gridy = 8;
        panelVerbatimValues.add(getJComboBoxCollection(), gbc_textFieldCollection);

        JLabel lblVerbatimNumbers = new JLabel("Verbatim Numbers");
        GridBagConstraints gbc_lblVerbatimNumbers = new GridBagConstraints();
        gbc_lblVerbatimNumbers.anchor = GridBagConstraints.EAST;
        gbc_lblVerbatimNumbers.insets = new Insets(0, 0, 5, 5);
        gbc_lblVerbatimNumbers.gridx = 0;
        gbc_lblVerbatimNumbers.gridy = 10;
        panelVerbatimValues.add(lblVerbatimNumbers, gbc_lblVerbatimNumbers);

        textFieldVerbNumbers = new JTextArea();
        textFieldVerbNumbers.setRows(3);
        textFieldVerbNumbers.setEditable(false);
        GridBagConstraints gbc_textFieldVerbNumbers = new GridBagConstraints();
        gbc_textFieldVerbNumbers.gridheight = 2;
        gbc_textFieldVerbNumbers.insets = new Insets(0, 0, 5, 5);
        gbc_textFieldVerbNumbers.fill = GridBagConstraints.BOTH;
        gbc_textFieldVerbNumbers.gridx = 1;
        gbc_textFieldVerbNumbers.gridy = 10;
        panelVerbatimValues.add(textFieldVerbNumbers, gbc_textFieldVerbNumbers);
        textFieldVerbNumbers.setColumns(30);

        JLabel lblNumbers = new JLabel("Numbers");
        GridBagConstraints gbc_lblNumbers = new GridBagConstraints();
        gbc_lblNumbers.anchor = GridBagConstraints.EAST;
        gbc_lblNumbers.insets = new Insets(0, 0, 5, 5);
        gbc_lblNumbers.gridx = 3;
        gbc_lblNumbers.gridy = 10;
        panelVerbatimValues.add(lblNumbers, gbc_lblNumbers);

        JButton btnAddNumber = new JButton("+");
        btnAddNumber.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent e) {
                ((NumberTableModel) jTableNumbers.getModel())
                        .addNumber(new edu.harvard.mcz.imagecapture.data.Number(null, "", ""));
            }
        });
        GridBagConstraints gbc_btnAddNumber = new GridBagConstraints();
        gbc_btnAddNumber.anchor = GridBagConstraints.EAST;
        gbc_btnAddNumber.insets = new Insets(0, 0, 5, 5);
        gbc_btnAddNumber.gridx = 3;
        gbc_btnAddNumber.gridy = 11;
        panelVerbatimValues.add(btnAddNumber, gbc_btnAddNumber);

        GridBagConstraints gbc_numberTable = new GridBagConstraints();
        gbc_numberTable.insets = new Insets(0, 0, 5, 5);
        gbc_numberTable.fill = GridBagConstraints.BOTH;
        gbc_numberTable.gridx = 4;
        gbc_numberTable.gridy = 10;
        gbc_numberTable.gridheight = 2;
        gbc_numberTable.gridwidth = 5;
        panelVerbatimValues.add(this.getJScrollPaneNumbers(), gbc_numberTable);

        JLabel lblVerbatimOtherText = new JLabel("Verbatim Other Text");
        GridBagConstraints gbc_lblVerbatimOtherText = new GridBagConstraints();
        gbc_lblVerbatimOtherText.anchor = GridBagConstraints.EAST;
        gbc_lblVerbatimOtherText.insets = new Insets(0, 0, 5, 5);
        gbc_lblVerbatimOtherText.gridx = 0;
        gbc_lblVerbatimOtherText.gridy = 12;
        panelVerbatimValues.add(lblVerbatimOtherText, gbc_lblVerbatimOtherText);

        textFieldVerbUnclassifiedText = new JTextArea();
        textFieldVerbUnclassifiedText.setEditable(false);
        textFieldVerbUnclassifiedText.setRows(5);
        GridBagConstraints gbc_textFieldVerbUnclassifiedText = new GridBagConstraints();
        gbc_textFieldVerbUnclassifiedText.gridheight = 3;
        gbc_textFieldVerbUnclassifiedText.insets = new Insets(0, 0, 5, 5);
        gbc_textFieldVerbUnclassifiedText.fill = GridBagConstraints.BOTH;
        gbc_textFieldVerbUnclassifiedText.gridx = 1;
        gbc_textFieldVerbUnclassifiedText.gridy = 12;
        panelVerbatimValues.add(textFieldVerbUnclassifiedText, gbc_textFieldVerbUnclassifiedText);
        textFieldVerbUnclassifiedText.setColumns(30);

        JLabel lblHabitat = new JLabel("Habitat");
        GridBagConstraints gbc_lblHabitat = new GridBagConstraints();
        gbc_lblHabitat.anchor = GridBagConstraints.EAST;
        gbc_lblHabitat.insets = new Insets(0, 0, 5, 5);
        gbc_lblHabitat.gridx = 3;
        gbc_lblHabitat.gridy = 12;
        panelVerbatimValues.add(lblHabitat, gbc_lblHabitat);

        textFieldHabitat = new JTextField();
        GridBagConstraints gbc_textFieldHabitat = new GridBagConstraints();
        gbc_textFieldHabitat.fill = GridBagConstraints.HORIZONTAL;
        gbc_textFieldHabitat.gridwidth = 4;
        gbc_textFieldHabitat.insets = new Insets(0, 0, 5, 5);
        gbc_textFieldHabitat.gridx = 4;
        gbc_textFieldHabitat.gridy = 12;
        panelVerbatimValues.add(textFieldHabitat, gbc_textFieldHabitat);
        textFieldHabitat.setColumns(10);

        JLabel lblMicrohabitat = new JLabel("Microhabitat");
        GridBagConstraints gbc_lblMicrohabitat = new GridBagConstraints();
        gbc_lblMicrohabitat.anchor = GridBagConstraints.EAST;
        gbc_lblMicrohabitat.insets = new Insets(0, 0, 5, 5);
        gbc_lblMicrohabitat.gridx = 3;
        gbc_lblMicrohabitat.gridy = 13;
        panelVerbatimValues.add(lblMicrohabitat, gbc_lblMicrohabitat);

        textFieldMicrohabitat = new JTextField();
        GridBagConstraints gbc_textFieldMicrohabitat = new GridBagConstraints();
        gbc_textFieldMicrohabitat.fill = GridBagConstraints.HORIZONTAL;
        gbc_textFieldMicrohabitat.gridwidth = 4;
        gbc_textFieldMicrohabitat.insets = new Insets(0, 0, 5, 5);
        gbc_textFieldMicrohabitat.gridx = 4;
        gbc_textFieldMicrohabitat.gridy = 13;
        panelVerbatimValues.add(textFieldMicrohabitat, gbc_textFieldMicrohabitat);
        textFieldMicrohabitat.setColumns(10);

        JLabel lblNewLabel_4 = new JLabel("Workflow Status");
        GridBagConstraints gbc_lblNewLabel_4 = new GridBagConstraints();
        gbc_lblNewLabel_4.insets = new Insets(0, 0, 5, 5);
        gbc_lblNewLabel_4.gridx = 3;
        gbc_lblNewLabel_4.gridy = 15;
        panelVerbatimValues.add(lblNewLabel_4, gbc_lblNewLabel_4);

        comboBoxWorkflowStatus = new JComboBox(WorkFlowStatus.getVerbatimClassifiedWorkFlowStatusValues());
        comboBoxWorkflowStatus.setSelectedItem(WorkFlowStatus.STAGE_CLASSIFIED);
        GridBagConstraints gbc_comboBoxWorkflowStatus = new GridBagConstraints();
        gbc_comboBoxWorkflowStatus.gridwidth = 4;
        gbc_comboBoxWorkflowStatus.fill = GridBagConstraints.HORIZONTAL;
        gbc_comboBoxWorkflowStatus.insets = new Insets(0, 0, 5, 5);
        gbc_comboBoxWorkflowStatus.gridx = 4;
        gbc_comboBoxWorkflowStatus.gridy = 15;
        panelVerbatimValues.add(comboBoxWorkflowStatus, gbc_comboBoxWorkflowStatus);

        JButton btnApplyToAll = new JButton("Apply To All Records");
        GridBagConstraints gbc_btnApplyToAll = new GridBagConstraints();
        gbc_btnApplyToAll.gridwidth = 4;
        gbc_btnApplyToAll.insets = new Insets(0, 0, 5, 5);
        gbc_btnApplyToAll.gridx = 4;
        gbc_btnApplyToAll.gridy = 16;
        panelVerbatimValues.add(btnApplyToAll, gbc_btnApplyToAll);
        btnApplyToAll.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                saveChanges();
            }
        });
    }
    {
        JPanel panelRelatedData = new JPanel();
        contentPanel.add(panelRelatedData);
        GridBagLayout gbl_panelRelatedData = new GridBagLayout();
        gbl_panelRelatedData.maximumLayoutSize(panelRelatedData);
        gbl_panelRelatedData.columnWidths = new int[] { 20, 33, 1, 0 };
        gbl_panelRelatedData.rowHeights = new int[] { 25, 0 };
        gbl_panelRelatedData.columnWeights = new double[] { 0.0, 1.0, 0.0, Double.MIN_VALUE };
        gbl_panelRelatedData.rowWeights = new double[] { 1.0, Double.MIN_VALUE };
        panelRelatedData.setLayout(gbl_panelRelatedData);
        {
            JLabel lblTaxa = new JLabel("Taxa");
            GridBagConstraints gbc_lblTaxa = new GridBagConstraints();
            gbc_lblTaxa.anchor = GridBagConstraints.NORTHEAST;
            gbc_lblTaxa.insets = new Insets(0, 0, 0, 5);
            gbc_lblTaxa.gridx = 0;
            gbc_lblTaxa.gridy = 0;
            panelRelatedData.add(lblTaxa, gbc_lblTaxa);
        }

        JScrollPane scrollPane = new JScrollPane();
        // scrollPane.setPreferredSize(new Dimension(1000,100));
        GridBagConstraints gbc_scrollPane = new GridBagConstraints();
        gbc_scrollPane.anchor = GridBagConstraints.NORTH;
        gbc_scrollPane.insets = new Insets(0, 0, 0, 5);
        gbc_scrollPane.fill = GridBagConstraints.BOTH;
        gbc_scrollPane.gridx = 1;
        gbc_scrollPane.gridy = 0;
        panelRelatedData.add(scrollPane, gbc_scrollPane);

        tableTaxa = new JTable();
        SpecimenLifeCycle sls = new SpecimenLifeCycle();
        tableTaxa.setModel(new CountValueTableModel(sls.findTaxaFromVerbatim(this.verbatimData),
                "Current Idenfifications for these verbatim values."));
        scrollPane.setViewportView(tableTaxa);
    }
    {
        JPanel buttonPane = new JPanel();
        buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
        getContentPane().add(buttonPane, BorderLayout.SOUTH);
        {
            JButton cancelButton = new JButton("Close");
            cancelButton.setActionCommand("Close");
            cancelButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    setVisible(false);
                }
            });
            buttonPane.add(cancelButton);
        }
    }
}

From source file:com.vgi.mafscaling.LogView.java

private void createChartTab() {
    JPanel plotPanel = new JPanel();
    add(plotPanel, "<html><div style='text-align: center;'>3<br>D<br><br>C<br>h<br>a<br>r<br>t</div></html>");
    GridBagLayout gbl_plotPanel = new GridBagLayout();
    gbl_plotPanel.columnWidths = new int[] { 0 };
    gbl_plotPanel.rowHeights = new int[] { 0, 0 };
    gbl_plotPanel.columnWeights = new double[] { 1.0 };
    gbl_plotPanel.rowWeights = new double[] { 0.0, 1.0 };
    plotPanel.setLayout(gbl_plotPanel);/*  w w  w.j a  v a2  s.  c  o m*/

    JPanel cntlPanel = new JPanel();
    GridBagConstraints gbc_ctrlPanel = new GridBagConstraints();
    gbc_ctrlPanel.insets = insets3;
    gbc_ctrlPanel.anchor = GridBagConstraints.NORTH;
    gbc_ctrlPanel.weightx = 1.0;
    gbc_ctrlPanel.fill = GridBagConstraints.HORIZONTAL;
    gbc_ctrlPanel.gridx = 0;
    gbc_ctrlPanel.gridy = 0;
    plotPanel.add(cntlPanel, gbc_ctrlPanel);

    GridBagLayout gbl_cntlPanel = new GridBagLayout();
    gbl_cntlPanel.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
    gbl_cntlPanel.rowHeights = new int[] { 0 };
    gbl_cntlPanel.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 };
    gbl_cntlPanel.rowWeights = new double[] { 0 };
    cntlPanel.setLayout(gbl_cntlPanel);

    GridBagConstraints gbc_label = new GridBagConstraints();
    gbc_label.anchor = GridBagConstraints.EAST;
    gbc_label.insets = new Insets(3, 3, 3, 0);
    gbc_label.gridx = 0;
    gbc_label.gridy = 0;

    GridBagConstraints gbc_column = new GridBagConstraints();
    gbc_column.anchor = GridBagConstraints.WEST;
    gbc_column.insets = insets3;
    gbc_column.gridx = 1;
    gbc_column.gridy = 0;

    cntlPanel.add(new JLabel("X-Axis"), gbc_label);

    xAxisColumn = new JComboBox<String>();
    xAxisColumn.setPrototypeDisplayValue("XXXXXXXXXXXXXXXXXXXXXXXXXXX");
    cntlPanel.add(xAxisColumn, gbc_column);

    gbc_label.gridx += 2;
    cntlPanel.add(new JLabel("Y-Axis"), gbc_label);

    gbc_column.gridx += 2;
    yAxisColumn = new JComboBox<String>();
    yAxisColumn.setPrototypeDisplayValue("XXXXXXXXXXXXXXXXXXXXXXXXXXX");
    cntlPanel.add(yAxisColumn, gbc_column);

    gbc_label.gridx += 2;
    cntlPanel.add(new JLabel("Plots"), gbc_label);

    gbc_column.gridx += 2;
    plotsColumn = new JMultiSelectionBox();
    plotsColumn.setPrototypeDisplayValue("XXXXXXXXXXXXXXXXXXXXXXXXXXX");
    cntlPanel.add(plotsColumn, gbc_column);

    gbc_label.gridx = 7;
    JButton btnGoButton = new JButton("View");
    btnGoButton.setActionCommand("view");
    btnGoButton.addActionListener(this);
    cntlPanel.add(btnGoButton, gbc_label);

    plot3d = new Plot3DPanel("SOUTH") {
        private static final long serialVersionUID = 7914951068593204419L;

        public void addPlotToolBar(String location) {
            super.addPlotToolBar(location);
            super.plotToolBar.remove(7);
            super.plotToolBar.remove(5);
            super.plotToolBar.remove(4);
        }
    };
    plot3d.setAutoBounds();
    plot3d.setAutoscrolls(true);
    plot3d.setEditable(false);
    plot3d.setBorder(BorderFactory.createLineBorder(Color.BLACK));
    plot3d.setForeground(Color.BLACK);
    plot3d.getAxis(0).setColor(Color.BLACK);
    plot3d.getAxis(1).setColor(Color.BLACK);
    plot3d.getAxis(2).setColor(Color.BLACK);

    GridBagConstraints gbc_chartPanel = new GridBagConstraints();
    gbc_chartPanel.anchor = GridBagConstraints.CENTER;
    gbc_chartPanel.insets = insets3;
    gbc_chartPanel.weightx = 1.0;
    gbc_chartPanel.weighty = 1.0;
    gbc_chartPanel.fill = GridBagConstraints.BOTH;
    gbc_chartPanel.gridx = 0;
    gbc_chartPanel.gridy = 1;
    plotPanel.add(plot3d, gbc_chartPanel);
}

From source file:net.sf.jabref.gui.FindUnlinkedFilesDialog.java

/**
 * Initializes the layout for the visible components in this menu. A
 * {@link GridBagLayout} is used.// www . jav  a  2 s.  c o m
 */
private void initLayout() {

    GridBagLayout gbl = new GridBagLayout();

    panelDirectory.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
            Localization.lang("Select directory")));
    panelFiles.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
            Localization.lang("Select files")));
    panelEntryTypesSelection.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
            Localization.lang("BibTeX entry creation")));

    Insets basicInsets = new Insets(6, 6, 6, 6);
    Insets smallInsets = new Insets(3, 2, 3, 1);
    Insets noInsets = new Insets(0, 0, 0, 0);

    //       x, y, w, h, wx,wy,ix,iy
    FindUnlinkedFilesDialog.addComponent(gbl, panelSearchArea, buttonScan, GridBagConstraints.HORIZONTAL,
            GridBagConstraints.EAST, noInsets, 0, 1, 1, 1, 1, 1, 40, 10);
    FindUnlinkedFilesDialog.addComponent(gbl, panelSearchArea, labelSearchingDirectoryInfo,
            GridBagConstraints.HORIZONTAL, GridBagConstraints.EAST, noInsets, 0, 2, 1, 1, 0, 0, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelSearchArea, progressBarSearching,
            GridBagConstraints.HORIZONTAL, GridBagConstraints.EAST, noInsets, 0, 3, 1, 1, 0, 0, 0, 0);

    FindUnlinkedFilesDialog.addComponent(gbl, panelDirectory, labelDirectoryDescription, null,
            GridBagConstraints.WEST, new Insets(6, 6, 0, 6), 0, 0, 3, 1, 0, 0, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelDirectory, textfieldDirectoryPath,
            GridBagConstraints.HORIZONTAL, null, basicInsets, 0, 1, 2, 1, 1, 1, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelDirectory, buttonBrowse, GridBagConstraints.HORIZONTAL,
            GridBagConstraints.EAST, basicInsets, 2, 1, 1, 1, 0, 0, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelDirectory, labelFileTypesDescription,
            GridBagConstraints.NONE, GridBagConstraints.WEST, new Insets(18, 6, 18, 3), 0, 3, 1, 1, 0, 0, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelDirectory, comboBoxFileTypeSelection,
            GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST, new Insets(18, 3, 18, 6), 1, 3, 1, 1, 1, 0,
            0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelDirectory, panelSearchArea, GridBagConstraints.HORIZONTAL,
            GridBagConstraints.EAST, new Insets(18, 6, 18, 6), 2, 3, 1, 1, 0, 0, 0, 0);

    FindUnlinkedFilesDialog.addComponent(gbl, panelFiles, labelFilesDescription, GridBagConstraints.HORIZONTAL,
            GridBagConstraints.WEST, new Insets(6, 6, 0, 6), 0, 0, 1, 1, 0, 0, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelFiles, scrollpaneTree, GridBagConstraints.BOTH,
            GridBagConstraints.CENTER, basicInsets, 0, 1, 1, 1, 1, 1, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelFiles, panelOptions, GridBagConstraints.NONE,
            GridBagConstraints.NORTHEAST, basicInsets, 1, 1, 1, 1, 0, 0, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelOptions, buttonOptionSelectAll,
            GridBagConstraints.HORIZONTAL, GridBagConstraints.NORTH, noInsets, 0, 0, 1, 1, 1, 0, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelOptions, buttonOptionUnselectAll,
            GridBagConstraints.HORIZONTAL, GridBagConstraints.NORTH, noInsets, 0, 1, 1, 1, 0, 0, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelOptions, buttonOptionExpandAll,
            GridBagConstraints.HORIZONTAL, GridBagConstraints.NORTH, new Insets(6, 0, 0, 0), 0, 2, 1, 1, 0, 0,
            0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelOptions, buttonOptionCollapseAll,
            GridBagConstraints.HORIZONTAL, GridBagConstraints.NORTH, noInsets, 0, 3, 1, 1, 0, 0, 0, 0);

    FindUnlinkedFilesDialog.addComponent(gbl, panelEntryTypesSelection, labelEntryTypeDescription,
            GridBagConstraints.NONE, GridBagConstraints.WEST, basicInsets, 0, 0, 1, 1, 0, 0, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelEntryTypesSelection, comboBoxEntryTypeSelection,
            GridBagConstraints.NONE, GridBagConstraints.WEST, basicInsets, 1, 0, 1, 1, 1, 0, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelEntryTypesSelection, checkboxCreateKeywords,
            GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST, basicInsets, 0, 1, 2, 1, 0, 0, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelImportArea, labelImportingInfo,
            GridBagConstraints.HORIZONTAL, GridBagConstraints.CENTER, new Insets(6, 6, 0, 6), 0, 1, 1, 1, 1, 0,
            0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelImportArea, progressBarImporting,
            GridBagConstraints.HORIZONTAL, GridBagConstraints.CENTER, new Insets(0, 6, 6, 6), 0, 2, 1, 1, 1, 0,
            0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, panelButtons, panelImportArea, GridBagConstraints.NONE,
            GridBagConstraints.EAST, smallInsets, 1, 0, 1, 1, 0, 0, 0, 0);

    FindUnlinkedFilesDialog.addComponent(gbl, getContentPane(), panelDirectory, GridBagConstraints.HORIZONTAL,
            GridBagConstraints.CENTER, basicInsets, 0, 0, 1, 1, 0, 0, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, getContentPane(), panelFiles, GridBagConstraints.BOTH,
            GridBagConstraints.NORTHWEST, new Insets(12, 6, 2, 2), 0, 1, 1, 1, 1, 1, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, getContentPane(), panelEntryTypesSelection,
            GridBagConstraints.HORIZONTAL, GridBagConstraints.SOUTHWEST, new Insets(12, 6, 2, 2), 0, 2, 1, 1, 0,
            0, 0, 0);
    FindUnlinkedFilesDialog.addComponent(gbl, getContentPane(), panelButtons, GridBagConstraints.HORIZONTAL,
            GridBagConstraints.CENTER, new Insets(10, 6, 10, 6), 0, 3, 1, 1, 0, 0, 0, 0);

    ButtonBarBuilder bb = new ButtonBarBuilder();
    bb.addGlue();
    bb.addButton(buttonApply);
    bb.addButton(buttonClose);
    bb.addGlue();

    bb.getPanel().setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    panelImportArea.add(bb.getPanel(), GridBagConstraints.NONE);
    pack();

}

From source file:org.bigwiv.blastgraph.gui.BlastGraphFrame.java

private void initComponents() {

    URL icon;//w w w.  j  av  a 2s .com
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/icon.png");
    this.setIconImage(Toolkit.getDefaultToolkit().createImage(icon));
    JComponent pane;
    pane = (JComponent) getContentPane();

    // ====================Menu Setting=======================
    newItem = new JMenuItem("New From Blast");
    newItem.setMnemonic('n');
    newItem.addActionListener(commandActionListener);

    openItem = new JMenuItem("Open");
    openItem.setMnemonic('o');
    openItem.addActionListener(commandActionListener);

    appendGraphItem = new JMenuItem("Append Graph");
    appendGraphItem.setMnemonic('a');
    appendGraphItem.addActionListener(commandActionListener);

    saveItem = new JMenuItem("Save");
    saveItem.setMnemonic('s');
    saveItem.addActionListener(commandActionListener);

    saveAsGraphItem = new JMenuItem("Save As");
    saveAsGraphItem.addActionListener(commandActionListener);

    exportGraphItem = new JMenuItem("Export");
    exportGraphItem.addActionListener(commandActionListener);

    saveCurGraphItem = new JMenuItem("Save Current Graph");
    saveCurGraphItem.addActionListener(commandActionListener);

    saveCurImgItem = new JMenuItem("Save Image");
    saveCurImgItem.addActionListener(commandActionListener);

    saveAllVertexAttrItem = new JMenuItem("Save Vertex Attribute");
    saveAllVertexAttrItem.addActionListener(commandActionListener);

    saveCurVertexAttrItem = new JMenuItem("Save Vertex Attribute");
    saveCurVertexAttrItem.addActionListener(commandActionListener);

    saveAsMenu = new JMenu("Save As");
    saveAsMenu.add(saveAsGraphItem);
    saveAsMenu.add(saveAllVertexAttrItem);

    saveCurGraphMenu = new JMenu("Save Current Graph");
    saveCurGraphMenu.add(saveCurGraphItem);
    saveCurGraphMenu.add(saveCurImgItem);
    saveCurGraphMenu.add(saveCurVertexAttrItem);

    printItem = new JMenuItem("Print...");
    printItem.setMnemonic('p');
    printItem.addActionListener(commandActionListener);

    importVertexAttrItem = new JMenuItem("Import Vertex Attribute");
    importVertexAttrItem.addActionListener(commandActionListener);

    closeItem = new JMenuItem("Close");
    closeItem.setMnemonic('c');
    closeItem.addActionListener(commandActionListener);

    exitItem = new JMenuItem("Exit");
    exitItem.setMnemonic('x');
    exitItem.addActionListener(commandActionListener);

    fileMenu = new JMenu("File");
    fileMenu.setMnemonic('f');
    fileMenu.add(newItem);
    fileMenu.add(openItem);
    fileMenu.add(appendGraphItem);
    fileMenu.add(new JSeparator());
    fileMenu.add(closeItem);
    fileMenu.add(new JSeparator());
    fileMenu.add(saveItem);
    fileMenu.add(saveAsMenu);
    fileMenu.add(saveCurGraphMenu);
    fileMenu.add(new JSeparator());
    fileMenu.add(printItem);
    fileMenu.add(new JSeparator());
    fileMenu.add(importVertexAttrItem);
    fileMenu.add(exportGraphItem);
    fileMenu.add(new JSeparator());
    fileMenu.add(exitItem);

    // edit menu
    undoItem = new JMenuItem("Undo");
    redoItem = new JMenuItem("Redo");
    Global.COMMAND_MANAGER.registerUndoRedoItem(undoItem, redoItem);
    removeSingleItem = new JMenuItem("Remove Single Vertices");
    removeSingleItem.addActionListener(commandActionListener);
    filterItem = new JMenuItem("Filt Graph");
    filterItem.addActionListener(commandActionListener);
    settingItem = new JMenuItem("Setting");
    settingItem.addActionListener(commandActionListener);

    markovClusterItem = new JMenuItem("Markov Cluster");
    markovClusterItem.addActionListener(commandActionListener);

    // genomeNumFiltItem = new JMenuItem("GenomeNum Filt");
    // genomeNumFiltItem.addActionListener(commandActionListener);

    // removeSingleLinkageItem = new JMenuItem("Remove Single Linkage");
    // removeSingleLinkageItem.addActionListener(commandActionListener);

    editMenu = new JMenu("Edit");
    editMenu.setMnemonic('e');
    editMenu.add(undoItem);
    editMenu.add(redoItem);
    editMenu.add(filterItem);
    editMenu.add(markovClusterItem);
    editMenu.add(removeSingleItem);
    // editMenu.add(genomeNumFiltItem);
    // editMenu.add(removeSingleLinkageItem);
    editMenu.add(settingItem);

    // Tools Item
    geneContentItem = new JMenuItem("Gene Content Table");
    geneContentItem.addActionListener(commandActionListener);

    batchSaveItem = new JMenuItem("Batch Save");
    batchSaveItem.addActionListener(commandActionListener);

    mstItem = new JMenuItem("Minimum Spanning Tree");
    mstItem.addActionListener(commandActionListener);

    viewNeighborItem = new JMenuItem("View Neighbor of...");
    viewNeighborItem.addActionListener(commandActionListener);

    //
    // tempWorkItem = new JMenuItem("Temp Work");
    // tempWorkItem.addActionListener(commandActionListener);

    toolsMenu = new JMenu("Tools");
    toolsMenu.setMnemonic('t');
    toolsMenu.add(geneContentItem);
    toolsMenu.add(viewNeighborItem);
    toolsMenu.add(mstItem);
    toolsMenu.add(batchSaveItem);
    // toolsMenu.add(tempWorkItem);

    // graph Menu
    graphMenu = new JMenu("Graph");
    previousItem = new JMenuItem("Previous");
    previousItem.addActionListener(commandActionListener);
    nextItem = new JMenuItem("Next");
    nextItem.addActionListener(commandActionListener);
    resortItem = new JMenuItem("Resort graphs");
    resortItem.addActionListener(commandActionListener);

    graphMenu.add(nextItem);
    graphMenu.add(previousItem);
    graphMenu.add(resortItem);

    // help Menu
    helpContentItem = new JMenuItem("Online Manual");
    helpContentItem.addActionListener(commandActionListener);
    aboutItem = new JMenuItem("About BlastGraph");
    aboutItem.addActionListener(commandActionListener);

    helpMenu = new JMenu("Help");
    helpMenu.add(helpContentItem);
    helpMenu.add(aboutItem);

    // menu bar
    menuBar = new JMenuBar();
    menuBar.add(fileMenu);
    menuBar.add(editMenu);
    menuBar.add(graphMenu);
    menuBar.add(toolsMenu);
    menuBar.add(helpMenu);

    setJMenuBar(menuBar);

    // ===================mainPanel Setting===================
    GridBagManager.reset();
    GridBagManager.GRID_BAG.fill = GridBagConstraints.BOTH;
    GridBagManager.GRID_BAG.anchor = GridBagConstraints.FIRST_LINE_START;
    GridBagManager.GRID_BAG.weightx = 0;
    GridBagManager.GRID_BAG.weighty = 0;
    GridBagManager.GRID_BAG.insets = new Insets(2, 2, 1, 1);

    mainPanel = new JPanel();
    mainPanel.setLayout(new BorderLayout());
    pane.add(mainPanel);

    hsplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    hsplitPane.setContinuousLayout(true);
    hsplitPane.setOneTouchExpandable(true);
    hsplitPane.setResizeWeight(0.9);

    // ===================toolBarPanel Setting===================

    // graph file toolbar
    fileToolBar = new JToolBar();
    fileToolBar.setRollover(true);
    newButton = new JButton();
    newButton.setBorderPainted(false);
    newButton.setMnemonic('n');
    newButton.setToolTipText("New From Blast");
    newButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/filenew.png");
    // System.out.println(icon);
    newButton.setIcon(new ImageIcon(icon));

    openButton = new JButton();
    openButton.setBorderPainted(false);
    openButton.setMnemonic('o');
    openButton.setToolTipText("Open");
    openButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/fileopen.png");
    openButton.setIcon(new ImageIcon(icon));

    saveButton = new JButton();
    saveButton.setBorderPainted(false);
    saveButton.setMnemonic('s');
    saveButton.setToolTipText("Save");
    saveButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/filesave.png");
    saveButton.setIcon(new ImageIcon(icon));

    saveCurImgButton = new JButton();
    saveCurImgButton.setBorderPainted(false);
    saveCurImgButton.setToolTipText("Save current image");
    saveCurImgButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/saveimage.png");
    saveCurImgButton.setIcon(new ImageIcon(icon));

    printButton = new JButton();
    printButton.setBorderPainted(false);
    printButton.setToolTipText("Print...");
    printButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/fileprint.png");
    printButton.setIcon(new ImageIcon(icon));

    fileToolBar.add(newButton);
    fileToolBar.add(openButton);
    fileToolBar.add(saveButton);
    fileToolBar.add(saveCurImgButton);
    fileToolBar.add(printButton);

    // graph control toolbar
    graphToolBar = new JToolBar();
    graphToolBar.setRollover(true);

    previousButton = new JButton();
    previousButton.setBorderPainted(false);
    previousButton.setToolTipText("Previous graph");
    previousButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/previous.png");
    previousButton.setIcon(new ImageIcon(icon));

    indexField = new JTextField();
    indexField.setSize(new Dimension(25, 16));
    indexField.setMinimumSize(new Dimension(25, 16));
    indexField.setPreferredSize(new Dimension(25, 16));
    indexField.addKeyListener(keyListener);

    nextButton = new JButton();
    nextButton.setBorderPainted(false);
    nextButton.setToolTipText("Next graph");
    nextButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/next.png");
    nextButton.setIcon(new ImageIcon(icon));

    filterButton = new JButton();
    filterButton.setBorderPainted(false);
    filterButton.setToolTipText("Filt graph");
    filterButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/filter.png");
    filterButton.setIcon(new ImageIcon(icon));

    resortButton = new JButton();
    resortButton.setBorderPainted(false);
    resortButton.setToolTipText("Resort graph");
    resortButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/resort.png");
    resortButton.setIcon(new ImageIcon(icon));

    searchField = new JTextField();
    searchField.setSize(new Dimension(60, 16));
    searchField.setMinimumSize(new Dimension(60, 16));
    searchField.setPreferredSize(new Dimension(60, 16));
    searchField.addKeyListener(keyListener);

    searchButton = new JButton();
    searchButton.setBorderPainted(false);
    searchButton.setToolTipText("Search");
    searchButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/search.png");
    searchButton.setIcon(new ImageIcon(icon));

    graphToolBar.add(filterButton);
    graphToolBar.add(resortButton);
    // graphToolBar.add(new JToolBar.Separator());
    graphToolBar.add(previousButton);
    graphToolBar.add(indexField);
    graphToolBar.add(nextButton);
    graphToolBar.add(searchField);
    graphToolBar.add(searchButton);

    // view toolbar (modebox & layoutbox)
    viewToolBar = new JToolBar();
    viewToolBar.setRollover(true);
    modeBox = graphMouse.getModeComboBox();
    modeBox.addItemListener(new ItemListener() {

        @Override
        public void itemStateChanged(ItemEvent e) {
            int index = modeBox.getSelectedIndex();
            if (index == 2) {
                int annotCount = annotationToolBar.getComponentCount();
                for (int i = 0; i < annotCount; i++) {
                    annotationToolBar.getComponent(i).setEnabled(true);
                }
            } else {
                int annotCount = annotationToolBar.getComponentCount();
                for (int i = 0; i < annotCount; i++) {
                    annotationToolBar.getComponent(i).setEnabled(false);
                }
            }

        }
    });
    layoutBox = this.getLayoutComboBox();
    viewToolBar.add(modeBox);
    viewToolBar.add(layoutBox);

    colorComboBox = new JComboBox(new String[] { "vertex color", "index", "strand", "genomeAcc", "organism" });
    viewToolBar.add(colorComboBox);

    // add additional menu to graphMenu
    modeMenu = graphMouse.getModeMenu();
    modeMenu.setText("Mode");
    layoutMenu = getLayoutMenu();
    layoutMenu.setText("Layout");
    graphMenu.add(modeMenu);
    graphMenu.add(layoutMenu);

    // annotation toolbar
    AnnotationControls<HitVertex, ValueEdge> annotationControls = new AnnotationControls<HitVertex, ValueEdge>(
            annotatingPlugin);
    annotationToolBar = annotationControls.getAnnotationsToolBar();
    ((JButton) annotationToolBar.getComponent(1)).setBorderPainted(false);
    ((JToggleButton) annotationToolBar.getComponent(2)).setBorderPainted(false);

    // add toolbars to toolBarPanel
    toolBarPanel = new JPanel();
    toolBarPanel.setLayout(new ModifiedFlowLayout(ModifiedFlowLayout.LEFT, 0, 0));
    toolBarPanel.setBorder(new EtchedBorder());
    toolBarPanel.add(fileToolBar);
    toolBarPanel.add(graphToolBar);
    toolBarPanel.add(viewToolBar);
    toolBarPanel.add(annotationToolBar);

    mainPanel.add(toolBarPanel, BorderLayout.NORTH);
    mainPanel.add(hsplitPane, BorderLayout.CENTER);

    // GridBagManager.add(mainPanel, toolBarPanel, 0, 0, 1, 1);
    // GridBagManager.add(mainPanel, hsplitPane, 0, 1, 1, 1);

    // mainPanel.add(toolBarPanel, BorderLayout.NORTH);

    // ===================vsplitPane Setting=================
    vsplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    vsplitPane.setContinuousLayout(true);
    vsplitPane.setOneTouchExpandable(true);
    vsplitPane.setResizeWeight(0.9);

    hsplitPane.setLeftComponent(vsplitPane);
    // GridBagManager.GRID_BAG.weightx = 0.9;
    // GridBagManager.GRID_BAG.weighty = 1;
    // GridBagManager.add(mainPanel, vsplitPane, 0, 1, 1, 2);
    // mainPanel.add(vsplitPane, BorderLayout.CENTER);

    // ===================vvPanel Setting===================

    vvPanel = new GraphZoomScrollPane(vv);
    vsplitPane.setTopComponent(vvPanel);

    // ===================Tab Panel Setting=======================
    // progressPanel = new ProgressPanel();

    verticesTable = new VerticesTable();
    verticesTable.addMouseListener(new MouseAdapter() {

        @Override
        public void mouseClicked(MouseEvent e) {
            int row = verticesTable.rowAtPoint(e.getPoint());
            int col = verticesTable.columnAtPoint(e.getPoint());
            // System.out.println(row + " " + col);
            String value = verticesTable.getValueAt(row, col).toString();
            // System.out.println(value);
            if (Global.graph.containsVertex(new HitVertex(value))) {
                for (int i = 0; i < subSetList.size(); i++) {
                    if (subSetList.get(i).contains(new HitVertex(value))) {
                        curGraph = FilterUtils.createInducedSubgraph(subSetList.get(i), Global.graph);
                        PickedState<HitVertex> pickedVertexState = vv.getPickedVertexState();

                        // picked is a reference to picked vertices
                        // use a temp set to avoid concurrent modification
                        Set<HitVertex> picked = pickedVertexState.getPicked();
                        Set<HitVertex> temp = new HashSet<HitVertex>();
                        for (HitVertex hitVertex : picked) {
                            temp.add(hitVertex);
                        }
                        for (HitVertex hv : temp) {
                            pickedVertexState.pick(hv, false);
                        }

                        pickedVertexState.pick(new HitVertex(value), true);
                        // refreshSubGraphView();
                        return;
                    }
                }
            }
        }
    });

    verticesTable.addMouseMotionListener(new MouseMotionAdapter() {
        @Override
        public void mouseMoved(MouseEvent e) {
            int row = verticesTable.rowAtPoint(e.getPoint());
            int col = verticesTable.columnAtPoint(e.getPoint());
            String value = verticesTable.getValueAt(row, col).toString();
            // System.out.println(value);
            if (Global.graph.containsVertex(value)) {
                Cursor normalCursor = new Cursor(Cursor.HAND_CURSOR);
                setCursor(normalCursor);
            } else {
                Cursor normalCursor = new Cursor(Cursor.DEFAULT_CURSOR);
                setCursor(normalCursor);
            }
        }
    });
    verticesPanel = new JPanel();
    verticesPanel.setLayout(new GridLayout());
    verticesPanel.add(new JScrollPane(verticesTable));

    edgesTable = new EdgesTable();
    edgesPanel = new JPanel();
    edgesPanel.setLayout(new GridLayout());
    edgesPanel.add(new JScrollPane(edgesTable));

    tabbedPane = new JTabbedPane();
    tabbedPane.addTab("Vertices", verticesPanel);
    tabbedPane.addTab("Edges", edgesPanel);
    vsplitPane.setBottomComponent(tabbedPane);

    graphMouse.addPichedChangeListener(verticesTable, edgesTable);

    // ===================Info Panel Setting===================
    infoPanel = new JPanel(new GridBagLayout());
    GridBagManager.GRID_BAG.weightx = 0.1;
    GridBagManager.GRID_BAG.weighty = 1;
    hsplitPane.setRightComponent(infoPanel);

    JPanel mainInfoPanel = new JPanel(new GridBagLayout());
    mainInfoPanel
            .setBorder(BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Main Info"));

    JPanel currentInfoPanel = new JPanel(new GridBagLayout());
    currentInfoPanel.setBorder(
            BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Current Graph"));
    JPanel selectedInfoPanel = new JPanel(new GridBagLayout());
    selectedInfoPanel
            .setBorder(BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Selected"));

    JPanel statisticsInfoPanel = new JPanel(new GridBagLayout());
    statisticsInfoPanel
            .setBorder(BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Statistics"));

    JPanel progressInfoPanel = new JPanel(new GridBagLayout());
    progressInfoPanel
            .setBorder(BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Progress"));

    GridBagManager.GRID_BAG.anchor = GridBagConstraints.NORTH;
    GridBagManager.GRID_BAG.fill = GridBagConstraints.HORIZONTAL;
    GridBagManager.GRID_BAG.weighty = 0;
    GridBagManager.add(infoPanel, mainInfoPanel, 0, 1, 1, 1);
    GridBagManager.add(infoPanel, currentInfoPanel, 0, 2, 1, 1);
    GridBagManager.add(infoPanel, selectedInfoPanel, 0, 3, 1, 1);
    GridBagManager.GRID_BAG.weighty = 0.5;
    GridBagManager.GRID_BAG.fill = GridBagConstraints.BOTH;
    GridBagManager.add(infoPanel, statisticsInfoPanel, 0, 4, 1, 1);
    GridBagManager.add(infoPanel, progressInfoPanel, 0, 5, 1, 1);

    // mainInfoPanel
    {
        JLabel vertices = new JLabel("Vertices:");
        vertexCountLabel = new JLabel("0");
        JLabel edges = new JLabel("Edges:");
        edgeCountLabel = new JLabel("0");
        JLabel subGraphs = new JLabel("SubGraphs:");
        subGraphCountLabel = new JLabel("0");
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.WEST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(mainInfoPanel, vertices, 0, 0, 1, 1);
        GridBagManager.add(mainInfoPanel, edges, 0, 1, 1, 1);
        GridBagManager.add(mainInfoPanel, subGraphs, 0, 2, 1, 1);
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.EAST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(mainInfoPanel, vertexCountLabel, 1, 0, 1, 1);
        GridBagManager.add(mainInfoPanel, edgeCountLabel, 1, 1, 1, 1);
        GridBagManager.add(mainInfoPanel, subGraphCountLabel, 1, 2, 1, 1);

    } // end of mainInfoPanel

    // currentInfoPanel
    {
        JLabel vertices = new JLabel("Vertices:");
        currentVertexCountLabel = new JLabel("0");

        JLabel edges = new JLabel("Edges:");
        currentEdgeCountLabel = new JLabel("0");

        JLabel acc = new JLabel("ACC:");
        currentAccLabel = new JLabel("0");

        GridBagManager.GRID_BAG.anchor = GridBagConstraints.WEST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(currentInfoPanel, vertices, 0, 0, 1, 1);
        GridBagManager.add(currentInfoPanel, edges, 0, 1, 1, 1);
        GridBagManager.add(currentInfoPanel, acc, 0, 2, 1, 1);
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.EAST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(currentInfoPanel, currentVertexCountLabel, 1, 0, 1, 1);
        GridBagManager.add(currentInfoPanel, currentEdgeCountLabel, 1, 1, 1, 1);
        GridBagManager.add(currentInfoPanel, currentAccLabel, 1, 2, 1, 1);

    } // end of currentInfoPanel

    // selectedInfoPanel
    {
        JLabel vertices = new JLabel("Vertices:");
        selectedVertexCountLabel = new JLabel("0");
        JLabel edges = new JLabel("Edges:");
        selectedEdgeCountLabel = new JLabel("0");
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.WEST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(selectedInfoPanel, vertices, 0, 0, 1, 1);
        GridBagManager.add(selectedInfoPanel, edges, 0, 1, 1, 1);
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.EAST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(selectedInfoPanel, selectedVertexCountLabel, 1, 0, 1, 1);
        GridBagManager.add(selectedInfoPanel, selectedEdgeCountLabel, 1, 1, 1, 1);
        CollectionChangeListener<HitVertex> svListener = new CollectionChangeListener<HitVertex>() {

            @Override
            public void onCollectionChange(Set<HitVertex> set) {
                selectedVertexCountLabel.setText("" + set.size());
            }
        };

        CollectionChangeListener<ValueEdge> veListener = new CollectionChangeListener<ValueEdge>() {

            @Override
            public void onCollectionChange(Set<ValueEdge> set) {
                selectedEdgeCountLabel.setText("" + set.size());
            }
        };

        graphMouse.addPichedChangeListener(svListener, veListener);

    } // end of selectedInfoPanel

    {// statistics Panel
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.NORTH;
        GridBagManager.GRID_BAG.fill = GridBagConstraints.BOTH;
        GridBagManager.add(statisticsInfoPanel, graphStatisticsPanel, 0, 0, 1, 1);
    } // statistics Panel

    {// progressInfoPanel
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.NORTH;
        GridBagManager.GRID_BAG.fill = GridBagConstraints.BOTH;
        GridBagManager.add(progressInfoPanel, progressPanel, 0, 0, 1, 1);
    } // progressInfoPanel
      // set frame size
    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
    setSize((screen.width * 3) / 4, (screen.height * 9) / 10);
    setLocation(screen.width / 6, screen.height / 16);

    refreshUI(false);
}

From source file:edu.harvard.mcz.imagecapture.PositionTemplateEditor.java

/**
 * This method initializes jPanel2   /*ww  w. j  av a  2 s  .  c o  m*/
 *    
 * @return javax.swing.JPanel   
 */
private JPanel getJPanel2() {
    if (jPanel2 == null) {
        GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
        gridBagConstraints3.fill = GridBagConstraints.BOTH;
        gridBagConstraints3.weighty = 1.0;
        gridBagConstraints3.anchor = GridBagConstraints.NORTH;
        gridBagConstraints3.weightx = 1.0;
        jPanel2 = new JPanel();
        jPanel2.setLayout(new GridBagLayout());
        jPanel2.add(getJScrollPane(), gridBagConstraints3);
    }
    return jPanel2;
}

From source file:edu.harvard.mcz.imagecapture.PositionTemplateEditor.java

/**
 * This method initializes jPanel1   /*  w  w  w . j a v  a2  s .  c om*/
 *    
 * @return javax.swing.JPanel   
 */
private JPanel getJPanel1() {
    if (jPanel1 == null) {
        GridBagConstraints gridBagConstraints19 = new GridBagConstraints();
        gridBagConstraints19.fill = GridBagConstraints.BOTH;
        gridBagConstraints19.weighty = 1.0;
        gridBagConstraints19.gridx = 2;
        gridBagConstraints19.gridy = 1;
        gridBagConstraints19.weightx = 1.0;
        jPanel1 = new JPanel();
        jPanel1.setLayout(new GridBagLayout());
        GridBagConstraints g1 = new GridBagConstraints();
        g1.gridx = 1;
        g1.anchor = GridBagConstraints.NORTHEAST;
        g1.weightx = 0.1;
        g1.weighty = 0.75;
        g1.fill = GridBagConstraints.HORIZONTAL;
        g1.gridy = 1;
        GridBagConstraints g2 = new GridBagConstraints();
        g2.gridx = 1;
        g2.anchor = GridBagConstraints.NORTH;
        g2.fill = GridBagConstraints.BOTH;
        g2.gridwidth = 2;
        g2.weighty = 0.2;
        g2.weightx = 0.0;
        g2.gridy = 0;
        jPanel1.add(getJPanel(), g1);
        jPanel1.add(getJPanel2(), g2);
        jPanel1.add(getJScrollPane1(), gridBagConstraints19);

    }
    return jPanel1;
}

From source file:net.sf.jabref.gui.JabRefFrame.java

private void initLayout() {
    tabbedPane.putClientProperty(Options.NO_CONTENT_BORDER_KEY, Boolean.TRUE);

    setProgressBarVisible(false);//from  w  w w .  ja v a 2s .  com

    pushExternalButton = new PushToApplicationButton(this, PushToApplications.getApplications());
    fillMenu();
    createToolBar();
    getContentPane().setLayout(gbl);
    splitPane.setDividerSize(2);
    splitPane.setBorder(null);
    //getContentPane().setBackground(GUIGlobals.lightGray);
    con.fill = GridBagConstraints.HORIZONTAL;
    con.anchor = GridBagConstraints.WEST;
    con.weightx = 1;
    con.weighty = 0;
    con.gridwidth = GridBagConstraints.REMAINDER;

    //gbl.setConstraints(mb, con);
    //getContentPane().add(mb);
    setJMenuBar(mb);
    con.anchor = GridBagConstraints.NORTH;
    //con.gridwidth = 1;//GridBagConstraints.REMAINDER;;
    gbl.setConstraints(tlb, con);
    getContentPane().add(tlb);

    Component lim = Box.createGlue();
    gbl.setConstraints(lim, con);
    //getContentPane().add(lim);
    /*
      JPanel empt = new JPanel();
      empt.setBackground(GUIGlobals.lightGray);
      gbl.setConstraints(empt, con);
       getContentPane().add(empt);
            
      con.insets = new Insets(1,0,1,1);
      con.anchor = GridBagConstraints.EAST;
      con.weightx = 0;
      gbl.setConstraints(searchManager, con);
      getContentPane().add(searchManager);*/
    con.gridwidth = GridBagConstraints.REMAINDER;
    con.weightx = 1;
    con.weighty = 0;
    con.fill = GridBagConstraints.BOTH;
    con.anchor = GridBagConstraints.WEST;
    con.insets = new Insets(0, 0, 0, 0);
    lim = Box.createGlue();
    gbl.setConstraints(lim, con);
    getContentPane().add(lim);
    //tabbedPane.setVisible(false);
    //tabbedPane.setForeground(GUIGlobals.lightGray);
    con.weighty = 1;
    gbl.setConstraints(splitPane, con);
    getContentPane().add(splitPane);

    UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0));

    splitPane.setRightComponent(tabbedPane);
    splitPane.setLeftComponent(sidePaneManager.getPanel());
    sidePaneManager.updateView();

    JPanel status = new JPanel();
    status.setLayout(gbl);
    con.weighty = 0;
    con.weightx = 0;
    con.gridwidth = 1;
    con.insets = new Insets(0, 2, 0, 0);
    gbl.setConstraints(statusLabel, con);
    status.add(statusLabel);
    con.weightx = 1;
    con.insets = new Insets(0, 4, 0, 0);
    con.gridwidth = 1;
    gbl.setConstraints(statusLine, con);
    status.add(statusLine);
    con.weightx = 0;
    con.gridwidth = GridBagConstraints.REMAINDER;
    con.insets = new Insets(2, 4, 2, 2);
    gbl.setConstraints(progressBar, con);
    status.add(progressBar);
    con.weightx = 1;
    con.gridwidth = GridBagConstraints.REMAINDER;
    statusLabel.setForeground(GUIGlobals.ENTRY_EDITOR_LABEL_COLOR.darker());
    con.insets = new Insets(0, 0, 0, 0);
    gbl.setConstraints(status, con);
    getContentPane().add(status);

    // Drag and drop for tabbedPane:
    TransferHandler xfer = new EntryTableTransferHandler(null, this, null);
    tabbedPane.setTransferHandler(xfer);
    tlb.setTransferHandler(xfer);
    mb.setTransferHandler(xfer);
    sidePaneManager.getPanel().setTransferHandler(xfer);
}

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

/** Action when selecting static element.
 * @since 1.0/*from ww w.j a v a2s.  c o m*/
 */
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:edu.harvard.mcz.imagecapture.SpecimenDetailsViewPane.java

/**
 * This method initializes jPanel, laying out the UI components.
 *    /*from   w  ww . j  a v  a2 s  .  c o  m*/
 * @return javax.swing.JPanel   
 */
private JPanel getJPanel() {
    if (jPanel == null) {
        GridBagConstraints gridBagConstraintsImgCount = new GridBagConstraints();
        gridBagConstraintsImgCount.fill = GridBagConstraints.BOTH;
        gridBagConstraintsImgCount.gridy = 6;
        gridBagConstraintsImgCount.weightx = 1.0;
        gridBagConstraintsImgCount.anchor = GridBagConstraints.WEST;
        gridBagConstraintsImgCount.gridwidth = 4;
        gridBagConstraintsImgCount.insets = new Insets(0, 3, 5, 0);
        gridBagConstraintsImgCount.ipadx = 3;
        gridBagConstraintsImgCount.gridx = 4;
        GridBagConstraints gridBagConstraints124 = new GridBagConstraints();
        gridBagConstraints124.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints124.gridx = 0;
        gridBagConstraints124.anchor = GridBagConstraints.EAST;
        gridBagConstraints124.gridy = 20;
        GridBagConstraints gridBagConstraints38 = new GridBagConstraints();
        gridBagConstraints38.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints38.gridx = 0;
        gridBagConstraints38.anchor = GridBagConstraints.EAST;
        gridBagConstraints38.gridy = 27;
        GridBagConstraints gridBagConstraints215 = new GridBagConstraints();
        gridBagConstraints215.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints215.gridx = 0;
        gridBagConstraints215.anchor = GridBagConstraints.EAST;
        gridBagConstraints215.gridy = 26;
        GridBagConstraints gridBagConstraints120 = new GridBagConstraints();
        gridBagConstraints120.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints120.gridx = 3;
        gridBagConstraints120.weightx = 1.0;
        gridBagConstraints120.gridy = 25;
        jLabel44 = new JLabel();
        jLabel44.setText("yyyy/mm/dd");
        GridBagConstraints gridBagConstraints49 = new GridBagConstraints();
        gridBagConstraints49.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints49.fill = GridBagConstraints.BOTH;
        gridBagConstraints49.weighty = 1.0;
        gridBagConstraints49.weightx = 1.0;
        gridBagConstraints49.gridx = 1;
        gridBagConstraints49.gridwidth = 7;
        gridBagConstraints49.gridy = 35;
        GridBagConstraints gridBagConstraints214 = new GridBagConstraints();
        gridBagConstraints214.gridwidth = 3;
        gridBagConstraints214.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints214.anchor = GridBagConstraints.EAST;
        gridBagConstraints214.gridx = 4;
        gridBagConstraints214.gridy = 42;
        gridBagConstraints214.weightx = 0.0;
        gridBagConstraints214.weighty = 0.0;
        gridBagConstraints214.fill = GridBagConstraints.NONE;
        GridBagConstraints gridBagConstraints119 = new GridBagConstraints();
        gridBagConstraints119.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints119.anchor = GridBagConstraints.WEST;
        gridBagConstraints119.gridx = 7;
        gridBagConstraints119.gridy = 42;
        gridBagConstraints119.weightx = 0.0;
        gridBagConstraints119.weighty = 0.0;
        gridBagConstraints119.fill = GridBagConstraints.NONE;
        GridBagConstraints gridBagConstraints213 = new GridBagConstraints();
        gridBagConstraints213.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints213.fill = GridBagConstraints.BOTH;
        gridBagConstraints213.gridy = 31;
        gridBagConstraints213.weightx = 0.0;
        gridBagConstraints213.gridwidth = 7;
        gridBagConstraints213.anchor = GridBagConstraints.WEST;
        gridBagConstraints213.gridx = 1;
        GridBagConstraints gridBagConstraints118 = new GridBagConstraints();
        gridBagConstraints118.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints118.gridx = 0;
        gridBagConstraints118.anchor = GridBagConstraints.EAST;
        gridBagConstraints118.gridwidth = 1;
        gridBagConstraints118.gridy = 31;
        jLabel31 = new JLabel();
        jLabel31.setText("Publications");
        GridBagConstraints gridBagConstraints212 = new GridBagConstraints();
        gridBagConstraints212.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints212.gridx = 3;
        gridBagConstraints212.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints212.gridwidth = 4;
        gridBagConstraints212.gridy = 15;
        GridBagConstraints gridBagConstraints117 = new GridBagConstraints();
        gridBagConstraints117.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints117.fill = GridBagConstraints.BOTH;
        gridBagConstraints117.gridy = 25;
        gridBagConstraints117.weightx = 0.0;
        gridBagConstraints117.gridwidth = 4;
        gridBagConstraints117.anchor = GridBagConstraints.WEST;
        gridBagConstraints117.gridx = 4;
        GridBagConstraints gridBagConstraints211 = new GridBagConstraints();
        gridBagConstraints211.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints211.gridx = 3;
        gridBagConstraints211.gridwidth = 4;
        gridBagConstraints211.weighty = 1.0;
        gridBagConstraints211.gridy = 44;
        GridBagConstraints gridBagConstraintsMS = new GridBagConstraints();
        gridBagConstraintsMS.fill = GridBagConstraints.BOTH;
        gridBagConstraintsMS.gridx = 0;
        gridBagConstraintsMS.gridwidth = 8;
        gridBagConstraintsMS.weighty = 1.0;
        gridBagConstraintsMS.gridy = 45;
        gridBagConstraintsMS.gridx = 0;

        GridBagConstraints gridBagConstraints116 = new GridBagConstraints();
        gridBagConstraints116.gridwidth = 3;
        gridBagConstraints116.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints116.gridx = 4;
        gridBagConstraints116.anchor = GridBagConstraints.EAST;
        gridBagConstraints116.gridy = 41;
        GridBagConstraints gridBagConstraintsInfer = new GridBagConstraints();
        gridBagConstraintsInfer.insets = new Insets(0, 0, 0, 0);
        gridBagConstraintsInfer.fill = GridBagConstraints.BOTH;
        gridBagConstraintsInfer.gridy = 36;
        gridBagConstraintsInfer.weightx = 1.0;
        gridBagConstraintsInfer.anchor = GridBagConstraints.WEST;
        gridBagConstraintsInfer.gridwidth = 7;
        gridBagConstraintsInfer.gridx = 1;
        GridBagConstraints gridBagConstraints56 = new GridBagConstraints();
        gridBagConstraints56.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints56.gridx = 0;
        gridBagConstraints56.anchor = GridBagConstraints.EAST;
        gridBagConstraints56.gridy = 36;
        jLabel43 = new JLabel();
        jLabel43.setText("Inferences");
        GridBagConstraints gridBagConstraints48 = new GridBagConstraints();
        gridBagConstraints48.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints48.fill = GridBagConstraints.VERTICAL;
        gridBagConstraints48.gridy = 0;
        gridBagConstraints48.weightx = 1.0;
        gridBagConstraints48.anchor = GridBagConstraints.WEST;
        gridBagConstraints48.gridwidth = 4;
        gridBagConstraints48.gridx = 4;
        GridBagConstraints gridBagConstraints37 = new GridBagConstraints();
        gridBagConstraints37.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints37.fill = GridBagConstraints.VERTICAL;
        gridBagConstraints37.gridx = 3;
        gridBagConstraints37.anchor = GridBagConstraints.EAST;
        gridBagConstraints37.gridy = 0;
        jLabel42 = new JLabel();
        jLabel42.setText("Collection");
        GridBagConstraints gridBagConstraints29 = new GridBagConstraints();
        gridBagConstraints29.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints29.fill = GridBagConstraints.BOTH;
        gridBagConstraints29.gridy = 41;
        gridBagConstraints29.weightx = 1.0;
        gridBagConstraints29.anchor = GridBagConstraints.WEST;
        gridBagConstraints29.gridwidth = 3;
        gridBagConstraints29.gridx = 1;
        GridBagConstraints gridBagConstraints115 = new GridBagConstraints();
        gridBagConstraints115.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints115.gridx = 0;
        gridBagConstraints115.gridy = 41;
        jLabel41 = new JLabel();
        jLabel41.setText("Workflow Status");
        GridBagConstraints gridBagConstraints172 = new GridBagConstraints();
        gridBagConstraints172.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints172.fill = GridBagConstraints.BOTH;
        gridBagConstraints172.gridy = 33;
        gridBagConstraints172.weightx = 1.0;
        gridBagConstraints172.anchor = GridBagConstraints.WEST;
        gridBagConstraints172.gridwidth = 4;
        gridBagConstraints172.gridx = 4;
        GridBagConstraints gridBagConstraints162 = new GridBagConstraints();
        gridBagConstraints162.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints162.fill = GridBagConstraints.BOTH;
        gridBagConstraints162.gridy = 33;
        gridBagConstraints162.weightx = 1.0;
        gridBagConstraints162.anchor = GridBagConstraints.WEST;
        gridBagConstraints162.gridwidth = 2;
        gridBagConstraints162.gridx = 1;
        GridBagConstraints gridBagConstraints142 = new GridBagConstraints();
        gridBagConstraints142.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints142.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints142.gridy = 42;
        gridBagConstraints142.weightx = 1.0;
        gridBagConstraints142.anchor = GridBagConstraints.NORTHWEST;
        gridBagConstraints142.gridwidth = 3;
        gridBagConstraints142.ipady = 2;
        gridBagConstraints142.gridx = 1;
        GridBagConstraints gridBagConstraints133 = new GridBagConstraints();
        gridBagConstraints133.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints133.gridx = 0;
        gridBagConstraints133.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints133.gridy = 42;
        jLabel40 = new JLabel();
        jLabel40.setText("Questions");
        GridBagConstraints gridBagConstraints123 = new GridBagConstraints();
        gridBagConstraints123.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints123.gridx = 3;
        gridBagConstraints123.anchor = GridBagConstraints.EAST;
        gridBagConstraints123.gridy = 33;
        jLabel39 = new JLabel();
        jLabel39.setText("Habitat");
        GridBagConstraints gridBagConstraints114 = new GridBagConstraints();
        gridBagConstraints114.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints114.gridx = 0;
        gridBagConstraints114.anchor = GridBagConstraints.EAST;
        gridBagConstraints114.gridy = 33;
        jLabel38 = new JLabel();
        jLabel38.setText("Associated Taxon");
        GridBagConstraints gridBagConstraints94 = new GridBagConstraints();
        gridBagConstraints94.gridwidth = 3;
        gridBagConstraints94.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints94.gridx = 4;
        gridBagConstraints94.anchor = GridBagConstraints.WEST;
        gridBagConstraints94.gridy = 18;
        jLabel36 = new JLabel();
        jLabel36.setText("Valid Dist.");
        GridBagConstraints gridBagConstraints83 = new GridBagConstraints();
        gridBagConstraints83.gridx = 3;
        gridBagConstraints83.anchor = GridBagConstraints.EAST;
        gridBagConstraints83.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints83.weightx = 1.0;
        gridBagConstraints83.gridy = 18;
        GridBagConstraints gridBagConstraints65 = new GridBagConstraints();
        gridBagConstraints65.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints65.gridx = 0;
        gridBagConstraints65.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints65.gridy = 35;
        jLabel35 = new JLabel();
        jLabel35.setText("Specimen Notes");
        GridBagConstraints gridBagConstraints47 = new GridBagConstraints();
        gridBagConstraints47.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints47.gridx = 0;
        gridBagConstraints47.fill = GridBagConstraints.VERTICAL;
        gridBagConstraints47.ipady = 12;
        gridBagConstraints47.gridy = 5;
        jLabel34 = new JLabel();
        jLabel34.setText("     ");
        GridBagConstraints gridBagConstraints19 = new GridBagConstraints();
        gridBagConstraints19.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints19.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints19.gridy = 23;
        gridBagConstraints19.weightx = 1.0;
        gridBagConstraints19.anchor = GridBagConstraints.NORTH;
        gridBagConstraints19.gridwidth = 5;
        gridBagConstraints19.gridx = 3;

        GridBagConstraints gridBagConstraints18 = new GridBagConstraints();
        gridBagConstraints18.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints18.fill = GridBagConstraints.BOTH;
        gridBagConstraints18.gridy = 19;
        gridBagConstraints18.weightx = 1.0;
        gridBagConstraints18.anchor = GridBagConstraints.WEST;
        gridBagConstraints18.gridx = 4;
        GridBagConstraints gbc_jLabelElevation = new GridBagConstraints();
        gbc_jLabelElevation.insets = new Insets(0, 0, 0, 5);
        gbc_jLabelElevation.gridx = 3;
        gbc_jLabelElevation.anchor = GridBagConstraints.EAST;
        gbc_jLabelElevation.gridy = 19;
        jLabelElevation = new JLabel();
        jLabelElevation.setText("Elevation");
        jLabel25 = new JLabel();
        jLabel25.setText("Text");
        jLabel26 = new JLabel();
        jLabel26.setText("Text");
        jLabel28 = new JLabel();
        jLabel28.setText("Rank");
        GridBagConstraints gridBagConstraints161 = new GridBagConstraints();
        gridBagConstraints161.gridx = 0;
        GridBagConstraints gridBagConstraints151 = new GridBagConstraints();
        gridBagConstraints151.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints151.fill = GridBagConstraints.BOTH;
        gridBagConstraints151.gridy = 27;
        gridBagConstraints151.weightx = 1.0;
        gridBagConstraints151.gridx = 1;
        GridBagConstraints gridBagConstraints141 = new GridBagConstraints();
        gridBagConstraints141.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints141.fill = GridBagConstraints.BOTH;
        gridBagConstraints141.gridy = 26;
        gridBagConstraints141.weightx = 1.0;
        gridBagConstraints141.gridx = 1;
        GridBagConstraints gridBagConstraints132 = new GridBagConstraints();
        gridBagConstraints132.gridwidth = 3;
        gridBagConstraints132.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints132.fill = GridBagConstraints.BOTH;
        gridBagConstraints132.gridy = 27;
        gridBagConstraints132.weightx = 1.0;
        gridBagConstraints132.gridx = 4;
        GridBagConstraints gridBagConstraints122 = new GridBagConstraints();
        gridBagConstraints122.gridwidth = 3;
        gridBagConstraints122.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints122.fill = GridBagConstraints.BOTH;
        gridBagConstraints122.gridy = 26;
        gridBagConstraints122.weightx = 1.0;
        gridBagConstraints122.gridx = 4;
        GridBagConstraints gridBagConstraints113 = new GridBagConstraints();
        gridBagConstraints113.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints113.gridx = 3;
        gridBagConstraints113.anchor = GridBagConstraints.EAST;
        gridBagConstraints113.gridy = 27;
        GridBagConstraints gridBagConstraints103 = new GridBagConstraints();
        gridBagConstraints103.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints103.gridx = 3;
        gridBagConstraints103.anchor = GridBagConstraints.EAST;
        gridBagConstraints103.gridy = 26;
        GridBagConstraints gridBagConstraints93 = new GridBagConstraints();
        gridBagConstraints93.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints93.fill = GridBagConstraints.BOTH;
        gridBagConstraints93.gridy = 12;
        gridBagConstraints93.weightx = 1.0;
        gridBagConstraints93.gridx = 1;
        GridBagConstraints gridBagConstraints84 = new GridBagConstraints();
        gridBagConstraints84.gridwidth = 3;
        gridBagConstraints84.fill = GridBagConstraints.BOTH;
        gridBagConstraints84.gridy = 12;
        gridBagConstraints84.weightx = 1.0;
        gridBagConstraints84.anchor = GridBagConstraints.WEST;
        gridBagConstraints84.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints84.gridx = 4;
        GridBagConstraints gridBagConstraints74 = new GridBagConstraints();
        gridBagConstraints74.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints74.gridx = 3;
        gridBagConstraints74.anchor = GridBagConstraints.EAST;
        gridBagConstraints74.weightx = 0.0;
        gridBagConstraints74.gridy = 12;
        //         GridBagConstraints gridBagConstraints64 = new GridBagConstraints();
        //         gridBagConstraints64.fill = GridBagConstraints.BOTH;
        //         gridBagConstraints64.gridy = 14;
        //         gridBagConstraints64.weightx = 1.0;
        //         gridBagConstraints64.gridx = 3;
        GridBagConstraints gridBagConstraints55 = new GridBagConstraints();
        gridBagConstraints55.gridx = 2;
        gridBagConstraints55.gridy = 14;
        //jLabel31 = new JLabel();
        //jLabel31.setText("Qual.");
        GridBagConstraints gridBagConstraints46 = new GridBagConstraints();
        gridBagConstraints46.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints46.fill = GridBagConstraints.BOTH;
        gridBagConstraints46.gridy = 14;
        gridBagConstraints46.weightx = 1.0;
        gridBagConstraints46.anchor = GridBagConstraints.WEST;
        gridBagConstraints46.gridx = 1;
        gridBagConstraints46.gridwidth = 2;
        GridBagConstraints gridBagConstraints36 = new GridBagConstraints();
        gridBagConstraints36.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints36.gridx = 0;
        gridBagConstraints36.anchor = GridBagConstraints.EAST;
        gridBagConstraints36.gridy = 14;
        jLabel30 = new JLabel();
        jLabel30.setText("Unnamed Form");
        GridBagConstraints gridBagConstraints210 = new GridBagConstraints();
        gridBagConstraints210.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints210.fill = GridBagConstraints.BOTH;
        gridBagConstraints210.gridy = 13;
        gridBagConstraints210.weightx = 1.0;
        gridBagConstraints210.anchor = GridBagConstraints.WEST;
        gridBagConstraints210.gridwidth = 2;
        gridBagConstraints210.gridx = 1;
        GridBagConstraints gridBagConstraints112 = new GridBagConstraints();
        gridBagConstraints112.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints112.gridx = 0;
        gridBagConstraints112.anchor = GridBagConstraints.EAST;
        gridBagConstraints112.gridy = 13;
        jLabel29 = new JLabel();
        jLabel29.setText("Author");
        GridBagConstraints gridBagConstraints110 = new GridBagConstraints();
        gridBagConstraints110.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints110.gridx = 0;
        gridBagConstraints110.gridy = 12;
        jLabel27 = new JLabel();
        jLabel27.setText("Infrasubspecifc Name");
        GridBagConstraints gridBagConstraints63 = new GridBagConstraints();
        gridBagConstraints63.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints63.fill = GridBagConstraints.BOTH;
        gridBagConstraints63.gridy = 25;
        gridBagConstraints63.weightx = 1.0;
        gridBagConstraints63.anchor = GridBagConstraints.WEST;
        gridBagConstraints63.gridx = 1;
        GridBagConstraints gridBagConstraints35 = new GridBagConstraints();
        gridBagConstraints35.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints35.gridx = 0;
        gridBagConstraints35.anchor = GridBagConstraints.EAST;
        gridBagConstraints35.gridy = 25;
        jLabel22 = new JLabel();
        jLabel22.setText("Verbatim Date");
        GridBagConstraints gridBagConstraints27 = new GridBagConstraints();
        gridBagConstraints27.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints27.fill = GridBagConstraints.BOTH;
        gridBagConstraints27.gridy = 30;
        gridBagConstraints27.weightx = 1.0;
        gridBagConstraints27.anchor = GridBagConstraints.WEST;
        gridBagConstraints27.gridx = 1;
        GridBagConstraints gridBagConstraints102 = new GridBagConstraints();
        gridBagConstraints102.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints102.fill = GridBagConstraints.VERTICAL;
        gridBagConstraints102.gridy = 30;
        gridBagConstraints102.weightx = 1.0;
        gridBagConstraints102.anchor = GridBagConstraints.WEST;
        gridBagConstraints102.gridwidth = 4;
        gridBagConstraints102.gridx = 4;
        GridBagConstraints gridBagConstraints92 = new GridBagConstraints();
        gridBagConstraints92.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints92.gridx = 3;
        gridBagConstraints92.anchor = GridBagConstraints.EAST;
        gridBagConstraints92.gridy = 30;
        jLabel21 = new JLabel();
        jLabel21.setText("Sex");
        GridBagConstraints gridBagConstraints82 = new GridBagConstraints();
        gridBagConstraints82.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints82.gridx = 0;
        gridBagConstraints82.anchor = GridBagConstraints.EAST;
        gridBagConstraints82.gridy = 30;
        jLabel20 = new JLabel();
        jLabel20.setText("LifeStage");
        GridBagConstraints gridBagConstraints62 = new GridBagConstraints();
        gridBagConstraints62.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints62.fill = GridBagConstraints.BOTH;
        gridBagConstraints62.gridy = 7;
        gridBagConstraints62.weightx = 1.0;
        gridBagConstraints62.anchor = GridBagConstraints.WEST;
        gridBagConstraints62.gridwidth = 4;
        gridBagConstraints62.gridx = 4;
        GridBagConstraints gridBagConstraints53 = new GridBagConstraints();
        gridBagConstraints53.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints53.fill = GridBagConstraints.BOTH;
        gridBagConstraints53.gridy = 7;
        gridBagConstraints53.weightx = 1.0;
        gridBagConstraints53.anchor = GridBagConstraints.WEST;
        gridBagConstraints53.gridwidth = 1;
        gridBagConstraints53.gridx = 1;
        GridBagConstraints gridBagConstraints44 = new GridBagConstraints();
        gridBagConstraints44.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints44.fill = GridBagConstraints.BOTH;
        gridBagConstraints44.gridy = 6;
        gridBagConstraints44.weightx = 1.0;
        gridBagConstraints44.anchor = GridBagConstraints.WEST;
        gridBagConstraints44.gridwidth = 3;
        gridBagConstraints44.gridx = 1;
        GridBagConstraints gbc_jLabelTribe = new GridBagConstraints();
        gbc_jLabelTribe.insets = new Insets(0, 0, 0, 5);
        gbc_jLabelTribe.gridx = 3;
        gbc_jLabelTribe.anchor = GridBagConstraints.EAST;
        gbc_jLabelTribe.gridy = 7;
        jLabelTribe = new JLabel();
        jLabelTribe.setText("Tribe");
        GridBagConstraints gridBagConstraints26 = new GridBagConstraints();
        gridBagConstraints26.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints26.gridx = 0;
        gridBagConstraints26.anchor = GridBagConstraints.EAST;
        gridBagConstraints26.gridy = 7;
        jLabel17 = new JLabel();
        jLabel17.setText("Subfamily");
        GridBagConstraints gridBagConstraints16 = new GridBagConstraints();
        gridBagConstraints16.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints16.gridx = 0;
        gridBagConstraints16.anchor = GridBagConstraints.EAST;
        gridBagConstraints16.gridy = 6;
        jLabel16 = new JLabel();
        jLabel16.setText("Family");
        GridBagConstraints gridBagConstraints131 = new GridBagConstraints();
        gridBagConstraints131.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints131.fill = GridBagConstraints.BOTH;
        gridBagConstraints131.gridy = 19;
        gridBagConstraints131.weightx = 1.0;
        gridBagConstraints131.anchor = GridBagConstraints.WEST;
        gridBagConstraints131.gridwidth = 2;
        gridBagConstraints131.gridx = 1;
        GridBagConstraints gridBagConstraints121 = new GridBagConstraints();
        gridBagConstraints121.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints121.fill = GridBagConstraints.BOTH;
        gridBagConstraints121.gridy = 18;
        gridBagConstraints121.weightx = 1.0;
        gridBagConstraints121.anchor = GridBagConstraints.WEST;
        gridBagConstraints121.gridwidth = 1;
        gridBagConstraints121.gridx = 1;
        GridBagConstraints gridBagConstraints111 = new GridBagConstraints();
        gridBagConstraints111.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints111.fill = GridBagConstraints.BOTH;
        gridBagConstraints111.gridy = 16;
        gridBagConstraints111.weightx = 1.0;
        gridBagConstraints111.anchor = GridBagConstraints.WEST;
        gridBagConstraints111.gridwidth = 7;
        gridBagConstraints111.gridx = 1;
        GridBagConstraints gridBagConstraints101 = new GridBagConstraints();
        gridBagConstraints101.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints101.gridx = 0;
        gridBagConstraints101.anchor = GridBagConstraints.EAST;
        gridBagConstraints101.gridy = 19;
        jLabel15 = new JLabel();
        jLabel15.setText("State/Province");
        GridBagConstraints gridBagConstraints91 = new GridBagConstraints();
        gridBagConstraints91.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints91.gridx = 0;
        gridBagConstraints91.anchor = GridBagConstraints.EAST;
        gridBagConstraints91.gridy = 18;
        jLabel14 = new JLabel();
        jLabel14.setText("Country");
        GridBagConstraints gridBagConstraints81 = new GridBagConstraints();
        gridBagConstraints81.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints81.gridx = 0;
        gridBagConstraints81.anchor = GridBagConstraints.EAST;
        gridBagConstraints81.gridy = 16;
        jLabel13 = new JLabel();
        jLabel13.setText("Verbatim Locality");
        GridBagConstraints gridBagConstraints71 = new GridBagConstraints();
        gridBagConstraints71.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints71.fill = GridBagConstraints.BOTH;
        gridBagConstraints71.gridy = 15;
        gridBagConstraints71.weightx = 1.0;
        gridBagConstraints71.anchor = GridBagConstraints.WEST;
        gridBagConstraints71.gridx = 1;
        GridBagConstraints gridBagConstraints61 = new GridBagConstraints();
        gridBagConstraints61.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints61.gridx = 0;
        gridBagConstraints61.anchor = GridBagConstraints.EAST;
        gridBagConstraints61.gridy = 15;
        jLabel12 = new JLabel();
        jLabel12.setText("DrawerNumber");
        GridBagConstraints gridBagConstraints52 = new GridBagConstraints();
        gridBagConstraints52.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints52.fill = GridBagConstraints.BOTH;
        gridBagConstraints52.gridy = 43;
        gridBagConstraints52.weightx = 1.0;
        gridBagConstraints52.weighty = 1.0;
        gridBagConstraints52.gridwidth = 8;
        gridBagConstraints52.gridx = 0;
        GridBagConstraints gridBagConstraints43 = new GridBagConstraints();
        gridBagConstraints43.gridheight = 2;
        gridBagConstraints43.gridx = 0;
        gridBagConstraints43.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints43.ipady = 0;
        gridBagConstraints43.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints43.gridy = 23;
        GridBagConstraints gridBagConstraints33 = new GridBagConstraints();
        gridBagConstraints33.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints33.gridx = 0;
        gridBagConstraints33.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints33.gridy = 4;
        GridBagConstraints gridBagConstraints25 = new GridBagConstraints();
        gridBagConstraints25.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints25.fill = GridBagConstraints.BOTH;
        gridBagConstraints25.gridy = 3;
        gridBagConstraints25.weightx = 1.0;
        gridBagConstraints25.weighty = 0.0;
        gridBagConstraints25.gridheight = 3;
        gridBagConstraints25.gridwidth = 6;
        gridBagConstraints25.gridx = 1;
        GridBagConstraints gridBagConstraints15 = new GridBagConstraints();
        gridBagConstraints15.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints15.gridx = 0;
        gridBagConstraints15.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints15.gridy = 3;
        jLabel11 = new JLabel();
        jLabel11.setText("Numbers");
        GridBagConstraints gridBagConstraints42 = new GridBagConstraints();
        gridBagConstraints42.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints42.gridx = 3;
        gridBagConstraints42.anchor = GridBagConstraints.EAST;
        gridBagConstraints42.gridy = 37;
        jLabel10 = new JLabel();
        jLabel10.setText("Date Created");
        GridBagConstraints gridBagConstraints32 = new GridBagConstraints();
        gridBagConstraints32.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints32.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints32.gridy = 37;
        gridBagConstraints32.weightx = 1.0;
        gridBagConstraints32.anchor = GridBagConstraints.WEST;
        gridBagConstraints32.gridwidth = 4;
        gridBagConstraints32.gridx = 4;
        GridBagConstraints gridBagConstraints24 = new GridBagConstraints();
        gridBagConstraints24.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints24.gridx = 0;
        gridBagConstraints24.anchor = GridBagConstraints.EAST;
        gridBagConstraints24.gridy = 37;
        jLabel9 = new JLabel();
        jLabel9.setText("CreatedBy");
        GridBagConstraints gridBagConstraints14 = new GridBagConstraints();
        gridBagConstraints14.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints14.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints14.gridy = 37;
        gridBagConstraints14.weightx = 1.0;
        gridBagConstraints14.anchor = GridBagConstraints.WEST;
        gridBagConstraints14.gridx = 1;
        GridBagConstraints gridBagConstraints23 = new GridBagConstraints();
        gridBagConstraints23.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints23.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints23.gridy = 39;
        gridBagConstraints23.weightx = 1.0;
        gridBagConstraints23.anchor = GridBagConstraints.WEST;
        gridBagConstraints23.gridwidth = 4;
        gridBagConstraints23.gridx = 4;
        GridBagConstraints gridBagConstraints13 = new GridBagConstraints();
        gridBagConstraints13.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints13.gridx = 3;
        gridBagConstraints13.anchor = GridBagConstraints.EAST;
        gridBagConstraints13.gridy = 39;
        jLabel8 = new JLabel();
        jLabel8.setText("Last Updated");
        GridBagConstraints gridBagConstraints22 = new GridBagConstraints();
        gridBagConstraints22.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints22.gridx = 0;
        gridBagConstraints22.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints22.gridy = 22;
        jLabel7 = new JLabel();
        jLabel7.setText("Collectors");
        GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
        gridBagConstraints12.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints12.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints12.gridy = 39;
        gridBagConstraints12.weightx = 1.0;
        gridBagConstraints12.anchor = GridBagConstraints.NORTHWEST;
        gridBagConstraints12.gridx = 1;
        GridBagConstraints gridBagConstraints51 = new GridBagConstraints();
        gridBagConstraints51.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints51.fill = GridBagConstraints.BOTH;
        gridBagConstraints51.gridy = 22;
        gridBagConstraints51.weightx = 1.0;
        gridBagConstraints51.anchor = GridBagConstraints.WEST;
        gridBagConstraints51.gridheight = 3;
        gridBagConstraints51.gridwidth = 2;
        gridBagConstraints51.gridx = 1;
        GridBagConstraints gridBagConstraints41 = new GridBagConstraints();
        gridBagConstraints41.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints41.gridx = 0;
        gridBagConstraints41.fill = GridBagConstraints.NONE;
        gridBagConstraints41.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints41.gridy = 39;
        jLabel6 = new JLabel();
        jLabel6.setText("LastUpdatedBy");
        GridBagConstraints gridBagConstraints31 = new GridBagConstraints();
        gridBagConstraints31.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints31.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints31.gridy = 21;
        gridBagConstraints31.weightx = 1.0;
        gridBagConstraints31.anchor = GridBagConstraints.WEST;
        gridBagConstraints31.gridwidth = 6;
        gridBagConstraints31.gridx = 1;
        GridBagConstraints gridBagConstraints21 = new GridBagConstraints();
        gridBagConstraints21.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints21.gridx = 0;
        gridBagConstraints21.anchor = GridBagConstraints.SOUTHEAST;
        gridBagConstraints21.gridy = 21;
        jLabel5 = new JLabel();
        jLabel5.setText("Collection");
        GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
        gridBagConstraints10.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints10.gridx = 7;
        gridBagConstraints10.anchor = GridBagConstraints.NORTHWEST;
        gridBagConstraints10.gridy = 41;
        gridBagConstraints10.weighty = 0.0;
        GridBagConstraints gridBagConstraints9 = new GridBagConstraints();
        gridBagConstraints9.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints9.gridx = 0;
        gridBagConstraints9.anchor = GridBagConstraints.EAST;
        gridBagConstraints9.gridy = 11;
        jLabel4 = new JLabel();
        jLabel4.setText("Subspecies");
        GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
        gridBagConstraints8.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints8.gridx = 0;
        gridBagConstraints8.anchor = GridBagConstraints.EAST;
        gridBagConstraints8.gridy = 10;
        jLabel3 = new JLabel();
        jLabel3.setText("Species");
        GridBagConstraints gridBagConstraints7 = new GridBagConstraints();
        gridBagConstraints7.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints7.fill = GridBagConstraints.BOTH;
        gridBagConstraints7.gridy = 20;
        gridBagConstraints7.weightx = 1.0;
        gridBagConstraints7.anchor = GridBagConstraints.WEST;
        gridBagConstraints7.gridwidth = 7;
        gridBagConstraints7.gridx = 1;
        GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
        gridBagConstraints5.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints5.fill = GridBagConstraints.BOTH;
        gridBagConstraints5.gridy = 11;
        gridBagConstraints5.weightx = 1.0;
        gridBagConstraints5.anchor = GridBagConstraints.WEST;
        gridBagConstraints5.gridwidth = 2;
        gridBagConstraints5.gridx = 1;
        GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
        gridBagConstraints4.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints4.fill = GridBagConstraints.BOTH;
        gridBagConstraints4.gridy = 10;
        gridBagConstraints4.weightx = 1.0;
        gridBagConstraints4.anchor = GridBagConstraints.WEST;
        gridBagConstraints4.gridwidth = 2;
        gridBagConstraints4.gridx = 1;
        GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
        gridBagConstraints3.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints3.fill = GridBagConstraints.BOTH;
        gridBagConstraints3.gridy = 9;
        gridBagConstraints3.weightx = 1.0;
        gridBagConstraints3.anchor = GridBagConstraints.WEST;
        gridBagConstraints3.gridwidth = 2;
        gridBagConstraints3.gridx = 1;
        GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
        gridBagConstraints2.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints2.gridx = 0;
        gridBagConstraints2.anchor = GridBagConstraints.EAST;
        gridBagConstraints2.gridy = 9;
        jLabel2 = new JLabel();
        jLabel2.setText("Genus");
        GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
        gridBagConstraints11.gridx = 0;
        gridBagConstraints11.gridy = 1;
        GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
        gridBagConstraints1.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints1.fill = GridBagConstraints.BOTH;
        gridBagConstraints1.gridy = 0;
        gridBagConstraints1.weightx = 1.0;
        gridBagConstraints1.anchor = GridBagConstraints.WEST;
        gridBagConstraints1.gridx = 1;
        GridBagConstraints gridBagConstraints = new GridBagConstraints();
        gridBagConstraints.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints.gridx = 0;
        gridBagConstraints.anchor = GridBagConstraints.EAST;
        gridBagConstraints.gridy = 0;
        jLabel = new JLabel();
        jLabel.setText("Barcode");
        jPanel = new JPanel();
        GridBagLayout gbl_jPanel = new GridBagLayout();
        gbl_jPanel.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
        gbl_jPanel.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
        gbl_jPanel.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
        gbl_jPanel.columnWeights = new double[] { 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0 };
        jPanel.setLayout(gbl_jPanel);
        jPanel.add(jLabel, gridBagConstraints);
        jPanel.add(getJTextFieldBarcode(), gridBagConstraints1);
        jPanel.add(jLabel2, gridBagConstraints2);
        jPanel.add(getJTextField1(), gridBagConstraints3);
        GridBagConstraints gbc_lblNatureofid = new GridBagConstraints();
        gbc_lblNatureofid.anchor = GridBagConstraints.EAST;
        gbc_lblNatureofid.insets = new Insets(0, 0, 0, 5);
        gbc_lblNatureofid.gridx = 3;
        gbc_lblNatureofid.gridy = 9;
        jPanel.add(getLblNatureofid(), gbc_lblNatureofid);

        jComboBoxNatureOfId = getJComboBoxNatureOfId();
        GridBagConstraints gbc_jTextFieldNatureOfID = new GridBagConstraints();
        gbc_jTextFieldNatureOfID.gridwidth = 4;
        gbc_jTextFieldNatureOfID.insets = new Insets(0, 0, 0, 0);
        gbc_jTextFieldNatureOfID.fill = GridBagConstraints.HORIZONTAL;
        gbc_jTextFieldNatureOfID.gridx = 4;
        gbc_jTextFieldNatureOfID.gridy = 9;
        jPanel.add(jComboBoxNatureOfId, gbc_jTextFieldNatureOfID);
        jPanel.add(getJTextField12(), gridBagConstraints4);
        GridBagConstraints gbc_lblIdDate = new GridBagConstraints();
        gbc_lblIdDate.anchor = GridBagConstraints.EAST;
        gbc_lblIdDate.insets = new Insets(0, 0, 0, 5);
        gbc_lblIdDate.gridx = 3;
        gbc_lblIdDate.gridy = 10;
        jPanel.add(getLblIdDate(), gbc_lblIdDate);

        jTextFieldDateDetermined = getJTextFieldDateDetermined();
        GridBagConstraints gbc_jTextFieldDateDetermined = new GridBagConstraints();
        gbc_jTextFieldDateDetermined.gridwidth = 4;
        gbc_jTextFieldDateDetermined.insets = new Insets(0, 0, 0, 0);
        gbc_jTextFieldDateDetermined.fill = GridBagConstraints.HORIZONTAL;
        gbc_jTextFieldDateDetermined.gridx = 4;
        gbc_jTextFieldDateDetermined.gridy = 10;
        jPanel.add(jTextFieldDateDetermined, gbc_jTextFieldDateDetermined);
        jTextFieldDateDetermined.setColumns(10);
        jPanel.add(getJTextField2(), gridBagConstraints5);

        JLabel lblIdBy = new JLabel("Id By");
        GridBagConstraints gbc_lblIdBy = new GridBagConstraints();
        gbc_lblIdBy.anchor = GridBagConstraints.EAST;
        gbc_lblIdBy.insets = new Insets(0, 0, 0, 5);
        gbc_lblIdBy.gridx = 3;
        gbc_lblIdBy.gridy = 11;
        jPanel.add(lblIdBy, gbc_lblIdBy);

        jCBDeterminer = getJCBDeterminer();
        GridBagConstraints gbc_jTextFieldDeterminer = new GridBagConstraints();
        gbc_jTextFieldDeterminer.gridwidth = 4;
        gbc_jTextFieldDeterminer.insets = new Insets(0, 0, 0, 0);
        gbc_jTextFieldDeterminer.fill = GridBagConstraints.HORIZONTAL;
        gbc_jTextFieldDeterminer.gridx = 4;
        gbc_jTextFieldDeterminer.gridy = 11;
        jPanel.add(jCBDeterminer, gbc_jTextFieldDeterminer);

        GridBagConstraints gbc_lblIdRemarks = new GridBagConstraints();
        gbc_lblIdRemarks.anchor = GridBagConstraints.EAST;
        gbc_lblIdRemarks.insets = new Insets(0, 0, 0, 5);
        gbc_lblIdRemarks.gridx = 3;
        gbc_lblIdRemarks.gridy = 13;
        jPanel.add(getLblIdRemarks(), gbc_lblIdRemarks);

        jTextFieldIdRemarks = getJTextFieldIdRemarks();
        GridBagConstraints gbc_jTextFieldIdRemarks = new GridBagConstraints();
        gbc_jTextFieldIdRemarks.insets = new Insets(0, 0, 0, 0);
        gbc_jTextFieldIdRemarks.fill = GridBagConstraints.HORIZONTAL;
        gbc_jTextFieldIdRemarks.gridx = 4;
        gbc_jTextFieldIdRemarks.gridy = 13;
        gbc_jTextFieldIdRemarks.gridwidth = 4;
        jPanel.add(jTextFieldIdRemarks, gbc_jTextFieldIdRemarks);
        jTextFieldIdRemarks.setColumns(10);
        GridBagConstraints gbc_lblTypestatus = new GridBagConstraints();
        gbc_lblTypestatus.anchor = GridBagConstraints.EAST;
        gbc_lblTypestatus.insets = new Insets(0, 0, 0, 5);
        gbc_lblTypestatus.gridx = 3;
        gbc_lblTypestatus.gridy = 14;
        jPanel.add(getLblTypestatus(), gbc_lblTypestatus);
        cbTypeStatus = getCbTypeStatus();
        GridBagConstraints gbc_cbTypeStatus = new GridBagConstraints();
        gbc_cbTypeStatus.gridwidth = 4;
        gbc_cbTypeStatus.insets = new Insets(0, 0, 0, 5);
        gbc_cbTypeStatus.fill = GridBagConstraints.HORIZONTAL;
        gbc_cbTypeStatus.gridx = 4;
        gbc_cbTypeStatus.gridy = 14;
        jPanel.add(cbTypeStatus, gbc_cbTypeStatus);
        GridBagConstraints gbc_lblHigherGeography = new GridBagConstraints();
        gbc_lblHigherGeography.anchor = GridBagConstraints.EAST;
        gbc_lblHigherGeography.insets = new Insets(0, 0, 0, 5);
        gbc_lblHigherGeography.gridx = 0;
        gbc_lblHigherGeography.gridy = 17;
        jPanel.add(getLblHigherGeography(), gbc_lblHigherGeography);
        GridBagConstraints gbc_comboBoxElevUnits = new GridBagConstraints();
        gbc_comboBoxElevUnits.insets = new Insets(0, 0, 0, 0);
        gbc_comboBoxElevUnits.gridwidth = 7;
        gbc_comboBoxElevUnits.fill = GridBagConstraints.HORIZONTAL;
        gbc_comboBoxElevUnits.gridx = 1;
        gbc_comboBoxElevUnits.gridy = 17;
        jPanel.add(getComboBoxHighGeog(), gbc_comboBoxElevUnits);
        GridBagConstraints gbc_lblTo = new GridBagConstraints();
        gbc_lblTo.insets = new Insets(0, 0, 0, 5);
        gbc_lblTo.anchor = GridBagConstraints.EAST;
        gbc_lblTo.gridx = 5;
        gbc_lblTo.gridy = 19;
        jPanel.add(getLblTo(), gbc_lblTo);
        GridBagConstraints gbc_textFieldMaxElev = new GridBagConstraints();
        gbc_textFieldMaxElev.insets = new Insets(0, 0, 0, 5);
        gbc_textFieldMaxElev.fill = GridBagConstraints.BOTH;
        gbc_textFieldMaxElev.gridx = 6;
        gbc_textFieldMaxElev.gridy = 19;
        jPanel.add(getTextFieldMaxElev(), gbc_textFieldMaxElev);
        GridBagConstraints gbc_comboBoxMaxElev = new GridBagConstraints();
        gbc_comboBoxMaxElev.insets = new Insets(0, 0, 0, 0);
        gbc_comboBoxMaxElev.fill = GridBagConstraints.HORIZONTAL;
        gbc_comboBoxMaxElev.gridx = 7;
        gbc_comboBoxMaxElev.gridy = 19;
        jPanel.add(getComboBoxElevUnits(), gbc_comboBoxMaxElev);
        jPanel.add(getJTextField3(), gridBagConstraints7);
        jPanel.add(jLabel3, gridBagConstraints8);
        jPanel.add(jLabel4, gridBagConstraints9);
        GridBagConstraints gridBagConstraints28 = new GridBagConstraints();
        gridBagConstraints28.gridwidth = 4;
        gridBagConstraints28.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints28.gridx = 3;
        gridBagConstraints28.anchor = GridBagConstraints.WEST;
        gridBagConstraints28.fill = GridBagConstraints.NONE;
        gridBagConstraints28.gridy = 22;
        jLabel33 = new JLabel();
        jLabel33.setText("Collecting Method");
        jPanel.add(jLabel33, gridBagConstraints28);
        GridBagConstraints gbc_georef = new GridBagConstraints();
        gbc_georef.insets = new Insets(0, 0, 0, 0);
        gbc_georef.gridwidth = 5;
        gbc_georef.fill = GridBagConstraints.HORIZONTAL;
        gbc_georef.gridx = 3;
        gbc_georef.gridy = 24;
        GridBagConstraints gridBagConstraints72 = new GridBagConstraints();
        gridBagConstraints72.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints72.gridx = 0;
        gridBagConstraints72.anchor = GridBagConstraints.EAST;
        gridBagConstraints72.gridy = 28;
        jLabel19 = new JLabel();
        jLabel19.setText("Features");
        jPanel.add(jLabel19, gridBagConstraints72);
        GridBagConstraints gridBagConstraints17 = new GridBagConstraints();
        gridBagConstraints17.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints17.fill = GridBagConstraints.VERTICAL;
        gridBagConstraints17.gridy = 28;
        gridBagConstraints17.weightx = 1.0;
        gridBagConstraints17.anchor = GridBagConstraints.WEST;
        gridBagConstraints17.gridx = 1;
        jPanel.add(getJComboBoxFeatures(), gridBagConstraints17);
        GridBagConstraints gridBagConstraints104 = new GridBagConstraints();
        gridBagConstraints104.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints104.gridx = 3;
        gridBagConstraints104.anchor = GridBagConstraints.EAST;
        gridBagConstraints104.gridy = 28;
        jLabel37 = new JLabel();
        jLabel37.setText("Prep Type");
        jPanel.add(jLabel37, gridBagConstraints104);
        GridBagConstraints gridBagConstraints152 = new GridBagConstraints();
        gridBagConstraints152.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints152.fill = GridBagConstraints.BOTH;
        gridBagConstraints152.gridy = 28;
        gridBagConstraints152.weightx = 1.0;
        gridBagConstraints152.anchor = GridBagConstraints.WEST;
        gridBagConstraints152.gridwidth = 4;
        gridBagConstraints152.gridx = 4;
        jPanel.add(getJTextFieldPrepType(), gridBagConstraints152);

        GridBagConstraints gridBagConstraintsPR = new GridBagConstraints();
        gridBagConstraintsPR.insets = new Insets(0, 0, 0, 0);
        gridBagConstraintsPR.gridx = 0;
        gridBagConstraintsPR.fill = GridBagConstraints.BOTH;
        gridBagConstraintsPR.gridwidth = 8;
        gridBagConstraintsPR.weighty = 1.0;
        gridBagConstraintsPR.gridy = 29;

        jPanel.add(getJScrollPaneSpecimenParts(), gridBagConstraintsPR);
        GridBagConstraints gbc_lblMicrohabitat = new GridBagConstraints();
        gbc_lblMicrohabitat.anchor = GridBagConstraints.EAST;
        gbc_lblMicrohabitat.insets = new Insets(0, 0, 0, 5);
        gbc_lblMicrohabitat.gridx = 0;
        gbc_lblMicrohabitat.gridy = 34;
        jPanel.add(getLblMicrohabitat(), gbc_lblMicrohabitat);
        GridBagConstraints gbc_textField = new GridBagConstraints();
        gbc_textField.insets = new Insets(0, 0, 0, 5);
        gbc_textField.fill = GridBagConstraints.HORIZONTAL;
        gbc_textField.gridx = 1;
        gbc_textField.gridy = 34;
        jPanel.add(getTextField(), gbc_textField);
        jPanel.add(getJButton(), gridBagConstraints10);
        jPanel.add(jLabel5, gridBagConstraints21);
        jPanel.add(getJTextFieldCollection(), gridBagConstraints31);
        jPanel.add(jLabel6, gridBagConstraints41);
        jPanel.add(getJTextField14(), gridBagConstraints12);
        jPanel.add(getJScrollPaneCollectors(), gridBagConstraints51);
        jPanel.add(jLabel7, gridBagConstraints22);
        jPanel.add(jLabel8, gridBagConstraints13);
        jPanel.add(getJTextFieldDateUpdated(), gridBagConstraints23);
        jPanel.add(getJTextField22(), gridBagConstraints14);
        jPanel.add(jLabel9, gridBagConstraints24);
        jPanel.add(getJTextField32(), gridBagConstraints32);
        jPanel.add(jLabel10, gridBagConstraints42);
        jPanel.add(jLabel11, gridBagConstraints15);
        jPanel.add(getJScrollPaneNumbers(), gridBagConstraints25);
        jPanel.add(getJButtonNumbersAdd(), gridBagConstraints33);
        jPanel.add(getJButtonCollsAdd(), gridBagConstraints43);
        jPanel.add(getJScrollPaneWarn(), gridBagConstraints52);
        jPanel.add(jLabel12, gridBagConstraints61);
        jPanel.add(getJTextField(), gridBagConstraints71);
        jPanel.add(jLabel13, gridBagConstraints81);
        jPanel.add(jLabel14, gridBagConstraints91);
        jPanel.add(jLabel15, gridBagConstraints101);
        jPanel.add(getJTextField4(), gridBagConstraints111);
        jPanel.add(getJTextField13(), gridBagConstraints121);
        jPanel.add(getJTextField23(), gridBagConstraints131);
        jPanel.add(jLabel16, gridBagConstraints16);
        jPanel.add(jLabel17, gridBagConstraints26);
        jPanel.add(jLabelTribe, gbc_jLabelTribe);
        jPanel.add(getJTextField5(), gridBagConstraints44);
        jPanel.add(getJTextFieldSubfamily(), gridBagConstraints53);
        jPanel.add(getJTextFieldTribe(), gridBagConstraints62);
        jPanel.add(jLabel20, gridBagConstraints82);
        jPanel.add(jLabel21, gridBagConstraints92);
        jPanel.add(getJComboBoxSex(), gridBagConstraints102);
        jPanel.add(getJComboBoxLifeStage(), gridBagConstraints27);
        jPanel.add(jLabel22, gridBagConstraints35);
        jPanel.add(getJTextFieldVerbatimDate(), gridBagConstraints63);
        jPanel.add(jLabel27, gridBagConstraints110);
        jPanel.add(jLabel29, gridBagConstraints112);
        jPanel.add(getJTextFieldAuthorship(), gridBagConstraints210);
        jPanel.add(jLabel30, gridBagConstraints36);
        jPanel.add(getJTextFieldUnnamedForm(), gridBagConstraints46);
        jPanel.add(jLabel28, gridBagConstraints74);
        jPanel.add(getJTextFieldInfraspecificRank(), gridBagConstraints84);
        jPanel.add(getJTextFieldInfraspecificName(), gridBagConstraints93);
        jPanel.add(jLabel25, gridBagConstraints103);
        jPanel.add(jLabel26, gridBagConstraints113);
        jPanel.add(getJTextFieldDateEmergedIndicator(), gridBagConstraints122);
        jPanel.add(getJTextFieldDateCollectedIndicator(), gridBagConstraints132);
        jPanel.add(getJTextFieldDateEmerged(), gridBagConstraints141);
        jPanel.add(getJTextFieldDateCollected(), gridBagConstraints151);
        jPanel.add(jLabelElevation, gbc_jLabelElevation);
        jPanel.add(getJTextField11(), gridBagConstraints18);
        jPanel.add(getJTextFieldCollectingMethod(), gridBagConstraints19);
        jPanel.add(getJButtonGeoreference(), gbc_georef);
        jPanel.add(jLabel34, gridBagConstraints47);
        jPanel.add(jLabel35, gridBagConstraints65);
        jPanel.add(getJCheckBox(), gridBagConstraints83);
        jPanel.add(jLabel36, gridBagConstraints94);
        jPanel.add(jLabel38, gridBagConstraints114);
        jPanel.add(jLabel39, gridBagConstraints123);
        jPanel.add(jLabel40, gridBagConstraints133);
        jPanel.add(getJTextField20(), gridBagConstraints142);
        jPanel.add(getJTextField26(), gridBagConstraints162);
        jPanel.add(getJTextFieldHabitat(), gridBagConstraints172);
        jPanel.add(jLabel41, gridBagConstraints115);
        jPanel.add(getJComboBoxWorkflowStatus(), gridBagConstraints29);
        jPanel.add(jLabel42, gridBagConstraints37);
        jPanel.add(getJComboBox2(), gridBagConstraints48);
        jPanel.add(jLabel43, gridBagConstraints56);
        jPanel.add(getJTextFieldInferences(), gridBagConstraintsInfer);
        jPanel.add(getJButton1(), gridBagConstraints116);
        jPanel.add(getJPanel1(), gridBagConstraints211);
        jPanel.add(getJTextFieldISODate(), gridBagConstraints117);
        jPanel.add(getJButtonDets(), gridBagConstraints212);
        jPanel.add(jLabel31, gridBagConstraints118);
        jPanel.add(getJTextField9(), gridBagConstraints213);
        jPanel.add(getJButtonNext(), gridBagConstraints119);
        jPanel.add(getJButtonPrevious(), gridBagConstraints214);
        jPanel.add(getJScrollPaneNotes(), gridBagConstraints49);
        jPanel.add(jLabel44, gridBagConstraints120);
        jPanel.add(getJButton13(), gridBagConstraints215);
        jPanel.add(getJButton2(), gridBagConstraints38);
        jPanel.add(getJButtonSpecificLocality(), gridBagConstraints124);
        jPanel.add(getJTextFieldImgCount(), gridBagConstraintsImgCount);
        jPanel.add(getJLabelMigrationStatus(), gridBagConstraintsMS);
    }
    return jPanel;
}