Example usage for javax.swing GroupLayout PREFERRED_SIZE

List of usage examples for javax.swing GroupLayout PREFERRED_SIZE

Introduction

In this page you can find the example usage for javax.swing GroupLayout PREFERRED_SIZE.

Prototype

int PREFERRED_SIZE

To view the source code for javax.swing GroupLayout PREFERRED_SIZE.

Click Source Link

Document

Indicates the preferred size from the component or gap should be used for a particular range value.

Usage

From source file:nz.govt.natlib.ndha.manualdeposit.customizemetadata.CustomizeMetaDataForm.java

private void initComponents() {

    pnlButtons = new javax.swing.JPanel();
    btnClose = new javax.swing.JButton();
    btnSaveAndClose = new javax.swing.JButton();
    btnOpen = new javax.swing.JButton();
    scrlMetaDataList = new javax.swing.JScrollPane();
    tblMetaDataList = new javax.swing.JTable();

    setTitle("MetaData Customization");
    setName("CustomizeMetaDataForm"); // NOI18N
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);/* w w w  .  j av  a  2 s .  com*/
        }

        public void windowOpened(java.awt.event.WindowEvent evt) {
            formWindowOpened(evt);
        }
    });

    btnClose.setText("Close");
    btnClose.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCloseActionPerformed(evt);
        }
    });

    btnSaveAndClose.setText("Save and Close");
    btnSaveAndClose.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveAndCloseActionPerformed(evt);
        }
    });

    btnOpen.setText("Open");
    btnOpen.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnOpenActionPerformed(evt);
        }
    });

    tblMetaDataList.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseReleased(MouseEvent e) {
            if (tblMetaDataList.getSelectedColumnCount() == 0 || tblMetaDataList.getSelectedColumnCount() > 1) {
                btnOpen.setEnabled(false);
            } else if (tblMetaDataList.getSelectedRowCount() > 1) {
                btnOpen.setEnabled(false);
            } else if (tblMetaDataList.getSelectedColumn() == 0) {
                btnOpen.setEnabled(true);
                if (e.getClickCount() == 2) {
                    btnOpenActionPerformed(null);
                }
            } else {
                btnOpen.setEnabled(false);
            }
        }
    });

    javax.swing.GroupLayout pnlButtonsLayout = new javax.swing.GroupLayout(pnlButtons);
    pnlButtonsLayout.setHorizontalGroup(pnlButtonsLayout.createParallelGroup(Alignment.LEADING)
            .addGroup(pnlButtonsLayout.createSequentialGroup().addContainerGap().addComponent(btnClose)
                    .addPreferredGap(ComponentPlacement.UNRELATED).addComponent(btnSaveAndClose).addGap(48)
                    .addComponent(btnOpen).addContainerGap(560, Short.MAX_VALUE)));
    pnlButtonsLayout.setVerticalGroup(pnlButtonsLayout.createParallelGroup(Alignment.LEADING)
            .addGroup(pnlButtonsLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pnlButtonsLayout.createParallelGroup(Alignment.BASELINE).addComponent(btnClose)
                            .addComponent(btnSaveAndClose).addComponent(btnOpen))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    pnlButtons.setLayout(pnlButtonsLayout);

    tblMetaDataList
            .setModel(new javax.swing.table.DefaultTableModel(
                    new Object[][] { { null, null, null, null }, { null, null, null, null },
                            { null, null, null, null }, { null, null, null, null } },
                    new String[] { "Title 1", "Title 2", "Title 3", "Title 4" }));
    scrlMetaDataList.setViewportView(tblMetaDataList);
    tblMetaDataList.setCellSelectionEnabled(true);
    // Add Copy/Paste/Delete functionality to the Customize Meta Data table.
    CustomizeExcelAdapter copyPastFunct = new CustomizeExcelAdapter(tblMetaDataList);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlButtons, javax.swing.GroupLayout.DEFAULT_SIZE,
                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(scrlMetaDataList, javax.swing.GroupLayout.DEFAULT_SIZE, 853, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addComponent(scrlMetaDataList, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
                    .addGap(8, 8, 8).addComponent(pnlButtons, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));

    pack();
}

From source file:nz.govt.natlib.ndha.manualdeposit.provenanceevent.ProvenanceEventsEditor.java

private void initComponents() {

    addProvenanceNoteButton = new javax.swing.JButton();
    removeProvenanceNoteButton = new javax.swing.JButton();
    copyProvenanceNoteButton = new javax.swing.JButton();
    closeButton = new javax.swing.JButton();
    sharedNotePropertiesPanel = new javax.swing.JPanel();
    eventTypeComboBox = new javax.swing.JComboBox();
    eventTypeLabel = new javax.swing.JLabel();
    eventIdentifierTypeLabel = new javax.swing.JLabel();
    eventIdentifierTypeTextBox = new javax.swing.JTextField();
    eventIdentifierValueLabel = new javax.swing.JLabel();
    eventIdentifierValueTextBox = new javax.swing.JTextField();
    eventOutcomeLabel = new javax.swing.JLabel();
    chkEventOutcome = new javax.swing.JCheckBox();
    eventOutcomeDetailLabel = new javax.swing.JLabel();
    eventDescription = new javax.swing.JTextField();
    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    eventOutcomeDetailValue = new javax.swing.JTextArea();
    warningMessageLabel = new javax.swing.JLabel();
    jScrollPane2 = new javax.swing.JScrollPane();
    entityNamesList = new javax.swing.JList();
    scrlProvenanceNotesList = new javax.swing.JScrollPane();
    provenanceNotesList = new javax.swing.JList();

    setTitle("Edit Provenance Events");
    setName("ProvenanceEventsEditor"); // NOI18N
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);//from  www.j a  v  a  2 s  . c o m
        }

        public void windowOpened(java.awt.event.WindowEvent evt) {
            formWindowOpened(evt);
        }
    });

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

    copyProvenanceNoteButton.setText("Copy");
    copyProvenanceNoteButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            copyProvenanceNoteButtonActionPerformed(evt);
        }
    });

    removeProvenanceNoteButton.setText("Remove");
    removeProvenanceNoteButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            removeProvenanceNoteButtonActionPerformed(evt);
        }
    });

    closeButton.setText("Close");
    closeButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            closeButtonActionPerformed(evt);
        }
    });

    sharedNotePropertiesPanel
            .setBorder(javax.swing.BorderFactory.createTitledBorder("Provenance Note properties"));

    eventTypeComboBox.setModel(
            new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

    eventTypeLabel.setText("Event type");

    eventIdentifierTypeLabel.setText("Event identifier type");

    eventIdentifierTypeTextBox.setText(ProvenanceEventsPresenter.DEFAULT_IDENTIFIER_TYPE);
    eventIdentifierTypeTextBox.setEnabled(false);

    eventIdentifierValueLabel.setText("Event identifier value");

    eventIdentifierValueTextBox.setText(ProvenanceEventsPresenter.DEFAULT_IDENTIFIER_VALUE);
    eventIdentifierValueTextBox.setEnabled(false);

    eventOutcomeLabel.setText("Successful outcome?");

    eventOutcomeDetailLabel.setText("Event outcome detail");

    eventDescription.setText(ProvenanceEventsPresenter.DEFAULT_EVENT_DESCRIPTION);
    eventDescription.setEnabled(false);

    jLabel1.setLabelFor(eventDescription);
    jLabel1.setText("Event Description");

    eventOutcomeDetailValue.setColumns(20);
    eventOutcomeDetailValue.setLineWrap(true);
    eventOutcomeDetailValue.setRows(5);
    jScrollPane1.setViewportView(eventOutcomeDetailValue);

    javax.swing.GroupLayout sharedNotePropertiesPanelLayout = new javax.swing.GroupLayout(
            sharedNotePropertiesPanel);
    sharedNotePropertiesPanel.setLayout(sharedNotePropertiesPanelLayout);
    sharedNotePropertiesPanelLayout.setHorizontalGroup(sharedNotePropertiesPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(sharedNotePropertiesPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(sharedNotePropertiesPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(eventIdentifierValueLabel).addComponent(eventIdentifierTypeLabel)
                            .addComponent(eventTypeLabel).addComponent(eventOutcomeLabel)
                            .addComponent(eventOutcomeDetailLabel).addComponent(jLabel1))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(sharedNotePropertiesPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(eventDescription).addComponent(chkEventOutcome)
                            .addComponent(eventIdentifierTypeTextBox)
                            .addComponent(eventTypeComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(eventIdentifierValueTextBox).addComponent(jScrollPane1,
                                    javax.swing.GroupLayout.Alignment.TRAILING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, 351, Short.MAX_VALUE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    sharedNotePropertiesPanelLayout.setVerticalGroup(sharedNotePropertiesPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(sharedNotePropertiesPanelLayout.createSequentialGroup()
                    .addGroup(sharedNotePropertiesPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(eventTypeLabel)
                            .addComponent(eventTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(sharedNotePropertiesPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(eventIdentifierTypeLabel).addComponent(eventIdentifierTypeTextBox,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(sharedNotePropertiesPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(eventIdentifierValueLabel).addComponent(eventIdentifierValueTextBox,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(sharedNotePropertiesPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(chkEventOutcome).addComponent(eventOutcomeLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(sharedNotePropertiesPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(eventOutcomeDetailLabel).addComponent(jScrollPane1,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE)
                    .addGroup(sharedNotePropertiesPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(eventDescription, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel1))));

    jLabel1.getAccessibleContext().setAccessibleName("event Description");

    warningMessageLabel.setForeground(new java.awt.Color(255, 51, 0));
    warningMessageLabel.setText("warning_message_place_holder");

    entityNamesList.setModel(new javax.swing.AbstractListModel() {
        String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };

        public int getSize() {
            return strings.length;
        }

        public Object getElementAt(int i) {
            return strings[i];
        }
    });
    jScrollPane2.setViewportView(entityNamesList);

    //        jList2.setModel(new javax.swing.AbstractListModel() {
    //            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
    //            public int getSize() { return strings.length; }
    //            public Object getElementAt(int i) { return strings[i]; }
    //        });
    scrlProvenanceNotesList.setViewportView(provenanceNotesList);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(jScrollPane2, GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(layout
                            .createParallelGroup(Alignment.TRAILING).addGroup(layout.createSequentialGroup()
                                    .addComponent(addProvenanceNoteButton, GroupLayout.PREFERRED_SIZE, 51,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE,
                                            Short.MAX_VALUE)
                                    .addComponent(removeProvenanceNoteButton))
                            .addComponent(scrlProvenanceNotesList, GroupLayout.DEFAULT_SIZE, 192,
                                    Short.MAX_VALUE))
                    .addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout
                            .createSequentialGroup().addGap(18)
                            .addGroup(layout.createParallelGroup(Alignment.TRAILING)
                                    .addComponent(warningMessageLabel, GroupLayout.DEFAULT_SIZE, 489,
                                            Short.MAX_VALUE)
                                    .addGroup(layout.createParallelGroup(Alignment.LEADING)
                                            .addGroup(layout.createSequentialGroup().addGap(10)
                                                    .addComponent(copyProvenanceNoteButton))
                                            .addComponent(sharedNotePropertiesPanel, GroupLayout.PREFERRED_SIZE,
                                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
                            .addContainerGap())
                            .addGroup(layout.createSequentialGroup()
                                    .addPreferredGap(ComponentPlacement.RELATED, 436, Short.MAX_VALUE)
                                    .addComponent(closeButton).addGap(22)))));
    layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(sharedNotePropertiesPanel, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(ComponentPlacement.RELATED).addComponent(copyProvenanceNoteButton)
                            .addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(warningMessageLabel))
                    .addComponent(jScrollPane2, GroupLayout.DEFAULT_SIZE, 320, Short.MAX_VALUE)
                    .addComponent(scrlProvenanceNotesList, GroupLayout.DEFAULT_SIZE, 320, Short.MAX_VALUE))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(closeButton)
                    .addComponent(removeProvenanceNoteButton).addComponent(addProvenanceNoteButton))
            .addGap(46)));
    getContentPane().setLayout(layout);

    pack();
}

From source file:nz.govt.natlib.ndha.manualdeposit.StructMapFileDescManagement.java

private void initComponents() {

    scrlDescription = new javax.swing.JScrollPane();
    lstDescription = new javax.swing.JList();
    pnlDetails = new javax.swing.JPanel();
    btnMoveUp = new javax.swing.JButton();
    btnMoveDown = new javax.swing.JButton();
    btnAddNew = new javax.swing.JButton();
    btnDelete = new javax.swing.JButton();
    btnSave = new javax.swing.JButton();
    btnCancel = new javax.swing.JButton();
    btnClose = new javax.swing.JButton();
    btnGenMainDesc = new javax.swing.JButton();

    setTitle("Manage Structure Map File Descriptions");
    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowOpened(java.awt.event.WindowEvent evt) {
            formWindowOpened(evt);/*from  w  ww  .ja  v  a2s .co  m*/
        }

        public void windowClosing(java.awt.event.WindowEvent evt) {
            dialogWindowClosing(evt);
        }
    });

    scrlDescription.setViewportView(lstDescription);

    JPanel panelLayer1 = new JPanel();
    panelLayer1.setAlignmentY(Component.TOP_ALIGNMENT);

    panel_ExtraLayers = new JPanel();
    panel_ExtraLayers.setAlignmentY(Component.TOP_ALIGNMENT);

    panel_ExtraLayers.setMinimumSize(new Dimension(300, 0));
    panel_ExtraLayers.setPreferredSize(new Dimension(300, 500));
    panel_ExtraLayers.setMaximumSize(new Dimension(300, 500));
    panel_ExtraLayers.setVisible(false);

    JLabel lblDescriptionL2 = new JLabel("Layer 2");
    lblDescriptionL2.setFont(new Font("Tahoma", Font.PLAIN, 11));

    JLabel lblDescription_1 = new JLabel("Description");

    textfldDescriptionL2 = new JTextField();
    textfldDescriptionL2.setName("DescriptionL2");
    textfldDescriptionL2.setColumns(10);

    JLabel lblFilePrefixL2 = new JLabel("File Prefix/Suffix");

    textfldFilePrefixL2 = new JTextField();
    textfldFilePrefixL2.setName("FilePrefixL2");
    textfldFilePrefixL2.setColumns(10);

    JLabel lblAllowMultiplesL2 = new JLabel("Allow Multiples?");

    checkAllowMultiplesL2 = new JCheckBox("");
    checkAllowMultiplesL2.setName("AllowMultiplesL2");

    JLabel lblDescriptionL3 = new JLabel("Layer 3");
    lblDescriptionL3.setFont(new Font("Tahoma", Font.PLAIN, 11));

    JLabel lblDescription_2 = new JLabel("Description");

    textfldDescriptionL3 = new JTextField();
    textfldDescriptionL3.setName("DescriptionL3");
    textfldDescriptionL3.setColumns(10);

    JLabel lblFilePrefixL3 = new JLabel("File Prefix/Suffix");

    textfldFilePrefixL3 = new JTextField();
    textfldFilePrefixL3.setName("FilePrefixL3");
    textfldFilePrefixL3.setColumns(10);

    JLabel lblAllowMultiplesL3 = new JLabel("Allow Multiples?");

    checkAllowMultiplesL3 = new JCheckBox("");
    checkAllowMultiplesL3.setName("AllowMultiplesL3");

    JLabel lblDescriptionL4 = new JLabel("Layer 4");
    lblDescriptionL4.setFont(new Font("Tahoma", Font.PLAIN, 11));

    JLabel lblDescription_3 = new JLabel("Description");

    textfldDescriptionL4 = new JTextField();
    textfldDescriptionL4.setName("DescriptionL4");
    textfldDescriptionL4.setColumns(10);

    lblFilePrefixL4 = new JLabel("File Prefix/Suffix");

    textfldFilePrefixL4 = new JTextField();
    textfldFilePrefixL4.setName("FilePrefixL4");
    textfldFilePrefixL4.setColumns(10);

    lblAllowMultiplesL4 = new JLabel("Allow Multiples?");

    checkAllowMultiplesL4 = new JCheckBox("");
    checkAllowMultiplesL4.setName("AllowMultiplesL4");

    GroupLayout gl_panel_ExtraLayers = new GroupLayout(panel_ExtraLayers);
    gl_panel_ExtraLayers
            .setHorizontalGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.LEADING)
                    .addGroup(gl_panel_ExtraLayers.createSequentialGroup().addContainerGap()
                            .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.LEADING)
                                    .addComponent(lblDescriptionL2)
                                    .addGroup(gl_panel_ExtraLayers.createSequentialGroup()
                                            .addComponent(lblDescription_1).addGap(44)
                                            .addComponent(textfldDescriptionL2, GroupLayout.DEFAULT_SIZE, 193,
                                                    Short.MAX_VALUE))
                                    .addGroup(gl_panel_ExtraLayers.createSequentialGroup()
                                            .addComponent(lblFilePrefixL2).addGap(18)
                                            .addComponent(textfldFilePrefixL2, GroupLayout.PREFERRED_SIZE, 53,
                                                    GroupLayout.PREFERRED_SIZE))
                                    .addGroup(gl_panel_ExtraLayers.createSequentialGroup()
                                            .addComponent(lblAllowMultiplesL2).addGap(18)
                                            .addComponent(checkAllowMultiplesL2))
                                    .addComponent(lblDescriptionL3)
                                    .addGroup(gl_panel_ExtraLayers.createSequentialGroup()
                                            .addGroup(gl_panel_ExtraLayers
                                                    .createParallelGroup(Alignment.LEADING)
                                                    .addComponent(lblDescription_2)
                                                    .addComponent(lblFilePrefixL3)
                                                    .addComponent(lblAllowMultiplesL3))
                                            .addGroup(gl_panel_ExtraLayers
                                                    .createParallelGroup(Alignment.LEADING)
                                                    .addGroup(gl_panel_ExtraLayers.createSequentialGroup()
                                                            .addGap(21)
                                                            .addGroup(gl_panel_ExtraLayers
                                                                    .createParallelGroup(Alignment.LEADING)
                                                                    .addComponent(textfldFilePrefixL3,
                                                                            GroupLayout.PREFERRED_SIZE, 50,
                                                                            GroupLayout.PREFERRED_SIZE)
                                                                    .addComponent(
                                                                            textfldDescriptionL3,
                                                                            GroupLayout.DEFAULT_SIZE, 190,
                                                                            Short.MAX_VALUE)))
                                                    .addGroup(gl_panel_ExtraLayers.createSequentialGroup()
                                                            .addGap(18)
                                                            .addGroup(gl_panel_ExtraLayers
                                                                    .createParallelGroup(Alignment.LEADING)
                                                                    .addComponent(textfldDescriptionL4,
                                                                            GroupLayout.DEFAULT_SIZE, 193,
                                                                            Short.MAX_VALUE)
                                                                    .addGroup(gl_panel_ExtraLayers
                                                                            .createSequentialGroup()
                                                                            .addComponent(checkAllowMultiplesL3)
                                                                            .addPreferredGap(
                                                                                    ComponentPlacement.RELATED,
                                                                                    172, Short.MAX_VALUE))))))
                                    .addComponent(lblDescriptionL4).addComponent(lblDescription_3)
                                    .addGroup(gl_panel_ExtraLayers.createSequentialGroup()
                                            .addComponent(lblFilePrefixL4).addGap(18)
                                            .addComponent(textfldFilePrefixL4, GroupLayout.PREFERRED_SIZE, 54,
                                                    GroupLayout.PREFERRED_SIZE))
                                    .addGroup(gl_panel_ExtraLayers.createSequentialGroup()
                                            .addComponent(lblAllowMultiplesL4).addGap(18)
                                            .addComponent(checkAllowMultiplesL4)))
                            .addContainerGap()));
    gl_panel_ExtraLayers.setVerticalGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panel_ExtraLayers.createSequentialGroup().addContainerGap()
                    .addComponent(lblDescriptionL2).addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE)
                            .addComponent(lblDescription_1)
                            .addComponent(textfldDescriptionL2, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE)
                            .addComponent(lblFilePrefixL2)
                            .addComponent(textfldFilePrefixL2, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE)
                            .addComponent(lblAllowMultiplesL2).addComponent(checkAllowMultiplesL2))
                    .addGap(18).addComponent(lblDescriptionL3).addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE)
                            .addComponent(lblDescription_2)
                            .addComponent(textfldDescriptionL3, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE)
                            .addComponent(lblFilePrefixL3)
                            .addComponent(textfldFilePrefixL3, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.LEADING)
                            .addComponent(lblAllowMultiplesL3).addComponent(checkAllowMultiplesL3))
                    .addGap(18).addComponent(lblDescriptionL4).addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE)
                            .addComponent(lblDescription_3)
                            .addComponent(textfldDescriptionL4, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE)
                            .addComponent(lblFilePrefixL4)
                            .addComponent(textfldFilePrefixL4, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE)
                            .addComponent(lblAllowMultiplesL4).addComponent(checkAllowMultiplesL4))
                    .addContainerGap(39, Short.MAX_VALUE)));
    panel_ExtraLayers.setLayout(gl_panel_ExtraLayers);

    lblDescription = new JLabel();
    lblDescription.setText("Description");

    textfldDescription = new JTextField();
    textfldDescription.setName("Description");

    textfldFilePrefix = new JTextField();
    textfldFilePrefix.setName("FilePrefix");

    lblFilePrefix = new JLabel();
    lblFilePrefix.setText("File Prefix/Suffix");

    lblPosition = new JLabel();
    lblPosition.setText("Position");

    cmbPosition = new JComboBox();
    cmbPosition.setName("Position");

    lblMandatory = new JLabel();
    lblMandatory.setText("Mandatory?");

    checkMandatory = new JCheckBox();
    checkMandatory.setName("Mandatory");

    lblAllowMultiples = new JLabel();
    lblAllowMultiples.setText("Allow Multiples?");

    checkAllowMultiples = new JCheckBox();
    checkAllowMultiples.setName("AllowMultiples");

    lblExtraLayers = new JLabel("Extra Layers?");

    checkExtraLayers = new JCheckBox("");
    checkExtraLayers.setName("ExtraLayers");
    checkExtraLayers.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            JCheckBox button = (JCheckBox) e.getSource();
            if (button.isSelected()) {
                panel_MainDesc.setVisible(true);
                panel_ExtraLayers.setVisible(true);
                pnlDetails.revalidate();
                pnlDetails.repaint();
            } else {
                panel_MainDesc.setVisible(false);
                panel_ExtraLayers.setVisible(false);
                pnlDetails.revalidate();
                pnlDetails.repaint();
            }
        }
    });

    GroupLayout gl_panelLayer1 = new GroupLayout(panelLayer1);
    gl_panelLayer1.setHorizontalGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panelLayer1.createSequentialGroup().addContainerGap()
                    .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelLayer1.createSequentialGroup()
                                    .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING)
                                            .addComponent(lblFilePrefix).addComponent(lblDescription)
                                            .addComponent(lblPosition))
                                    .addGap(18)
                                    .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING)
                                            .addComponent(textfldFilePrefix, GroupLayout.PREFERRED_SIZE, 51,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(textfldDescription, GroupLayout.DEFAULT_SIZE, 169,
                                                    Short.MAX_VALUE)
                                            .addComponent(cmbPosition, 0, 169, Short.MAX_VALUE)))
                            .addGroup(
                                    gl_panelLayer1.createSequentialGroup()
                                            .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING)
                                                    .addComponent(lblAllowMultiples)
                                                    .addComponent(lblExtraLayers).addComponent(lblMandatory))
                                            .addGap(18)
                                            .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING)
                                                    .addComponent(checkExtraLayers).addComponent(checkMandatory)
                                                    .addComponent(checkAllowMultiples))))
                    .addContainerGap()));
    gl_panelLayer1
            .setVerticalGroup(gl_panelLayer1.createParallelGroup(Alignment.TRAILING).addGroup(Alignment.LEADING,
                    gl_panelLayer1.createSequentialGroup().addGap(24)
                            .addGroup(gl_panelLayer1.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(lblDescription)
                                    .addComponent(textfldDescription, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(ComponentPlacement.RELATED)
                            .addGroup(gl_panelLayer1
                                    .createParallelGroup(Alignment.BASELINE).addComponent(lblFilePrefix)
                                    .addComponent(textfldFilePrefix, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(ComponentPlacement.RELATED)
                            .addGroup(gl_panelLayer1.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(lblPosition)
                                    .addComponent(cmbPosition, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                            .addGap(8)
                            .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING)
                                    .addComponent(checkMandatory).addComponent(lblMandatory))
                            .addPreferredGap(ComponentPlacement.RELATED)
                            .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING)
                                    .addComponent(checkAllowMultiples).addComponent(lblAllowMultiples))
                            .addPreferredGap(ComponentPlacement.UNRELATED)
                            .addGroup(gl_panelLayer1.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(lblExtraLayers).addComponent(checkExtraLayers))
                            .addContainerGap(26, Short.MAX_VALUE)));
    panelLayer1.setLayout(gl_panelLayer1);

    btnMoveUp.setPreferredSize(new java.awt.Dimension(91, 23));
    btnMoveUp.setText("Move Up");

    btnMoveDown.setText("Move Down");

    btnAddNew.setText("Add New");

    btnDelete.setText("Delete");

    btnSave.setText("Save");

    btnCancel.setText("Cancel");

    btnClose.setText("Close");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.TRAILING).addGroup(layout.createSequentialGroup()
                    .addComponent(scrlDescription, GroupLayout.DEFAULT_SIZE, 172, Short.MAX_VALUE).addGap(18)
                    .addGroup(layout.createParallelGroup(Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup().addComponent(btnAddNew).addGap(18)
                                    .addComponent(btnDelete, GroupLayout.PREFERRED_SIZE, 75,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addGap(19))
                            .addComponent(pnlDetails, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(btnMoveUp, GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
                            .addPreferredGap(ComponentPlacement.RELATED)
                            .addComponent(btnMoveDown, GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE).addGap(89)
                            .addComponent(btnSave, GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE)
                            .addPreferredGap(ComponentPlacement.UNRELATED)
                            .addComponent(btnCancel, GroupLayout.DEFAULT_SIZE, 68, Short.MAX_VALUE)
                            .addPreferredGap(ComponentPlacement.UNRELATED)
                            .addComponent(btnClose, GroupLayout.DEFAULT_SIZE, 62, Short.MAX_VALUE)))
            .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup()
                    .addComponent(pnlDetails, GroupLayout.PREFERRED_SIZE, 597, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(btnDelete)
                            .addComponent(btnAddNew)))
                    .addComponent(scrlDescription, GroupLayout.DEFAULT_SIZE, 387, Short.MAX_VALUE))
            .addGap(18)
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                            .addComponent(btnMoveUp, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnMoveDown))
                    .addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(btnClose)
                            .addComponent(btnCancel).addComponent(btnSave)))
            .addContainerGap()));
    pnlDetails.setLayout(new BoxLayout(pnlDetails, BoxLayout.Y_AXIS));

    panel_MainDesc = new JPanel();

    panel_MainDesc.setMinimumSize(new Dimension(300, 0));
    panel_MainDesc.setPreferredSize(new Dimension(300, 60));
    panel_MainDesc.setMaximumSize(new Dimension(300, 60));
    panel_MainDesc.setVisible(false);

    lblDescriptionMain = new JLabel("Main Description");

    textfldDescriptionMain = new JTextField();
    textfldDescriptionMain.setName("DescriptionMain");
    textfldDescriptionMain.setColumns(10);

    btnGenMainDesc_1 = new JButton("");
    btnGenMainDesc_1.setToolTipText("Generate a main description by concatenating layer descriptions.");
    btnGenMainDesc_1.setContentAreaFilled(false);
    btnGenMainDesc_1.setIcon(new ImageIcon(StructMapFileDescManagement.class
            .getResource("/org/jdesktop/swingx/plaf/basic/resources/month-down.png")));
    GroupLayout gl_panel_MainDesc = new GroupLayout(panel_MainDesc);
    gl_panel_MainDesc.setHorizontalGroup(gl_panel_MainDesc.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panel_MainDesc.createSequentialGroup().addContainerGap()
                    .addComponent(lblDescriptionMain).addGap(18)
                    .addComponent(textfldDescriptionMain, GroupLayout.PREFERRED_SIZE, 165,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(btnGenMainDesc_1, GroupLayout.PREFERRED_SIZE, 25, Short.MAX_VALUE)
                    .addContainerGap()));
    gl_panel_MainDesc.setVerticalGroup(gl_panel_MainDesc.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panel_MainDesc.createSequentialGroup().addContainerGap().addGroup(gl_panel_MainDesc
                    .createParallelGroup(Alignment.LEADING)
                    .addComponent(btnGenMainDesc_1, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
                    .addGroup(gl_panel_MainDesc.createParallelGroup(Alignment.BASELINE)
                            .addComponent(lblDescriptionMain).addComponent(textfldDescriptionMain,
                                    GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    panel_MainDesc.setLayout(gl_panel_MainDesc);
    pnlDetails.add(panel_MainDesc);
    pnlDetails.add(panelLayer1);
    pnlDetails.add(panel_ExtraLayers);
    getContentPane().setLayout(layout);

    pack();
}

From source file:org.bitbucket.mlopatkin.android.logviewer.ConfigurationDialog.java

private ConfigurationDialog(Frame owner) {
    super(owner);
    setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    setModalityType(ModalityType.APPLICATION_MODAL);
    setTitle("Configuration");
    setBounds(100, 100, 400, 122);//from   w w w .  j av  a 2  s . c o  m
    getContentPane().setLayout(new BorderLayout());
    contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
    getContentPane().add(contentPanel, BorderLayout.CENTER);

    JLabel lblAdbExecutableLocation = new JLabel("ADB executable location");

    textAdbExecutable = new JTextField(Configuration.adb.executable());
    lblAdbExecutableLocation.setLabelFor(textAdbExecutable);
    textAdbExecutable.setColumns(10);

    JButton btBrowseAdb = new JButton("...");

    btBrowseAdb.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            JFileChooser fileChooser = new JFileChooser();
            int result = fileChooser.showOpenDialog(ConfigurationDialog.this);
            if (result == JFileChooser.APPROVE_OPTION) {
                textAdbExecutable.setText(fileChooser.getSelectedFile().getAbsolutePath());
            }
        }
    });
    GroupLayout gl_contentPanel = new GroupLayout(contentPanel);
    gl_contentPanel.setHorizontalGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_contentPanel.createSequentialGroup().addComponent(lblAdbExecutableLocation)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(textAdbExecutable, GroupLayout.DEFAULT_SIZE, 486, Short.MAX_VALUE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(btBrowseAdb, GroupLayout.PREFERRED_SIZE, 33, GroupLayout.PREFERRED_SIZE)));
    gl_contentPanel.setVerticalGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_contentPanel.createSequentialGroup()
                    .addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)
                            .addComponent(lblAdbExecutableLocation)
                            .addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(textAdbExecutable, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(btBrowseAdb)))
                    .addContainerGap(375, Short.MAX_VALUE)));
    contentPanel.setLayout(gl_contentPanel);
    {
        JPanel buttonPane = new JPanel();
        buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
        getContentPane().add(buttonPane, BorderLayout.SOUTH);
        {
            JButton okButton = new JButton(acOk);
            buttonPane.add(okButton);
            getRootPane().setDefaultButton(okButton);
        }
        {
            JButton cancelButton = new JButton(acCancel);
            buttonPane.add(cancelButton);
        }
    }
}

From source file:org.dc.file.search.ui.DashboardForm.java

/**
 * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The
 * content of this method is always regenerated by the Form Editor.
 *//* w ww.j a va2s  . co m*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    txtSearchKey = new javax.swing.JTextField();
    btnSearch = new javax.swing.JButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    tblSearchResults = new javax.swing.JTable();
    btnFilesList = new javax.swing.JButton();
    btnPeersList = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    chkAdvancedSearch = new javax.swing.JCheckBox();
    lblHopCount = new javax.swing.JLabel();
    txtHopCount = new javax.swing.JTextField();
    lblTimeout = new javax.swing.JLabel();
    txtTimeoutSec = new javax.swing.JTextField();
    lblSec = new javax.swing.JLabel();
    progressBar = new javax.swing.JProgressBar();
    sliderHopCount = new javax.swing.JSlider();
    sliderTimout = new javax.swing.JSlider();
    jLabel2 = new javax.swing.JLabel();
    btnNewComment = new javax.swing.JButton();
    jScrollPane3 = new javax.swing.JScrollPane();
    tblComments = new javax.swing.JTable();
    jScrollPane4 = new javax.swing.JScrollPane();
    txtCommentThread = new javax.swing.JTextArea();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);
        }
    });

    btnSearch.setText("Search");
    btnSearch.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSearchActionPerformed(evt);
        }
    });

    tblSearchResults
            .setModel(new javax.swing.table.DefaultTableModel(
                    new Object[][] { { null, null, null, null }, { null, null, null, null },
                            { null, null, null, null }, { null, null, null, null } },
                    new String[] { "Peer", "Hop Count", "File", "Ratings" }));
    jScrollPane1.setViewportView(tblSearchResults);

    btnFilesList.setText("Files List");
    btnFilesList.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnFilesListActionPerformed(evt);
        }
    });

    btnPeersList.setText("Peers List");
    btnPeersList.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnPeersListActionPerformed(evt);
        }
    });

    jLabel1.setText("File Name:");

    chkAdvancedSearch.setText("Enable Advanced Search");
    chkAdvancedSearch.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            chkAdvancedSearchActionPerformed(evt);
        }
    });

    lblHopCount.setLabelFor(txtHopCount);
    lblHopCount.setText("Hop Count:");

    txtHopCount.setEditable(false);
    txtHopCount.setText("2");
    txtHopCount.setToolTipText("");

    lblTimeout.setLabelFor(txtTimeoutSec);
    lblTimeout.setText("Timeout:");

    txtTimeoutSec.setEditable(false);
    txtTimeoutSec.setText("5");

    lblSec.setText("sec");

    sliderHopCount.setMaximum(20);
    sliderHopCount.setMinimum(2);
    sliderHopCount.setValue(2);
    sliderHopCount.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            sliderHopCountStateChanged(evt);
        }
    });

    sliderTimout.setMaximum(60);
    sliderTimout.setMinimum(5);
    sliderTimout.setMinorTickSpacing(5);
    sliderTimout.setValue(5);
    sliderTimout.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            sliderTimoutStateChanged(evt);
        }
    });

    jLabel2.setText("Comments");

    btnNewComment.setText("New Comment");
    btnNewComment.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnNewCommentActionPerformed(evt);
        }
    });

    tblComments
            .setModel(new javax.swing.table.DefaultTableModel(
                    new Object[][] { { null, null, null, null }, { null, null, null, null },
                            { null, null, null, null }, { null, null, null, null } },
                    new String[] { "Id", "Comment", "Ratings", "Reply" }));
    jScrollPane3.setViewportView(tblComments);
    if (tblComments.getColumnModel().getColumnCount() > 0) {
        tblComments.getColumnModel().getColumn(0).setPreferredWidth(250);
    }

    txtCommentThread.setColumns(20);
    txtCommentThread.setRows(5);
    jScrollPane4.setViewportView(txtCommentThread);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jScrollPane1)
                            .addGroup(layout.createSequentialGroup().addComponent(jLabel1)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(txtSearchKey)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(btnSearch))
                            .addGroup(layout
                                    .createSequentialGroup().addComponent(jLabel2)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(btnNewComment))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout
                                                    .createSequentialGroup().addComponent(btnFilesList)
                                                    .addPreferredGap(
                                                            javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(btnPeersList))
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout
                                                    .createSequentialGroup().addComponent(lblHopCount)
                                                    .addPreferredGap(
                                                            javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(txtHopCount,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 33,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(
                                                            javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(sliderHopCount,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 170,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(
                                                            javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(lblTimeout)
                                                    .addPreferredGap(
                                                            javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(txtTimeoutSec,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 33,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(5, 5, 5).addComponent(lblSec)
                                                    .addPreferredGap(
                                                            javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                    .addComponent(sliderTimout,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 123,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(5, 5, 5))))
                            .addComponent(jScrollPane3).addGroup(layout.createSequentialGroup()
                                    .addComponent(chkAdvancedSearch).addGap(0, 0, Short.MAX_VALUE))
                            .addComponent(jScrollPane4))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(10, 10, 10).addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(btnSearch)
                    .addComponent(txtSearchKey, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(chkAdvancedSearch)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(lblHopCount)
                                            .addComponent(txtHopCount, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(lblTimeout)
                                            .addComponent(txtTimeoutSec, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(lblSec))
                                    .addComponent(sliderHopCount, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(sliderTimout, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 158,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnNewComment).addComponent(jLabel2))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 107,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnFilesList).addComponent(btnPeersList))
                    .addContainerGap()));

    pack();
}

From source file:org.domainmath.gui.MainFrame.java

/** This method is called from within the constructor to
 * initialize the form./*from   www  .j  a v a  2s .c o  m*/
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    buttonGroup1 = new javax.swing.ButtonGroup();
    jToolBar1 = new javax.swing.JToolBar();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    jSeparator4 = new javax.swing.JToolBar.Separator();
    connectButton = new javax.swing.JButton();
    disconnectButton = new javax.swing.JButton();
    jSeparator9 = new javax.swing.JToolBar.Separator();
    jButton4 = new javax.swing.JButton();
    jButton5 = new javax.swing.JButton();
    jSeparator15 = new javax.swing.JToolBar.Separator();
    jButton6 = new javax.swing.JButton();
    jButton7 = new javax.swing.JButton();
    jButton8 = new javax.swing.JButton();
    jSeparator13 = new javax.swing.JToolBar.Separator();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    dirComboBox = new javax.swing.JComboBox();
    folderUpButton = new javax.swing.JButton();
    browseButton = new javax.swing.JButton();
    addButton = new javax.swing.JButton();
    jMenuBar1 = new javax.swing.JMenuBar();
    fileMenu = new javax.swing.JMenu();
    newFileItem = new javax.swing.JMenuItem();
    openItem = new javax.swing.JMenuItem();
    jSeparator17 = new javax.swing.JPopupMenu.Separator();
    saveFileItem = new javax.swing.JMenuItem();
    saveAsItem = new javax.swing.JMenuItem();
    savePlotItem = new javax.swing.JMenuItem();
    saveAllItem = new javax.swing.JMenuItem();
    jSeparator1 = new javax.swing.JPopupMenu.Separator();
    printFileItem = new javax.swing.JMenuItem();
    printItem = new javax.swing.JMenuItem();
    jSeparator19 = new javax.swing.JPopupMenu.Separator();
    preferencesItem = new javax.swing.JMenuItem();
    jSeparator2 = new javax.swing.JPopupMenu.Separator();
    connectItem = new javax.swing.JMenuItem();
    disconnectItem = new javax.swing.JMenuItem();
    jSeparator3 = new javax.swing.JPopupMenu.Separator();
    exitItem = new javax.swing.JMenuItem();
    editMenu = new javax.swing.JMenu();
    undoItem = new javax.swing.JMenuItem();
    redoItem = new javax.swing.JMenuItem();
    jSeparator20 = new javax.swing.JPopupMenu.Separator();
    cutItem = new javax.swing.JMenuItem();
    copyItem = new javax.swing.JMenuItem();
    pasteItem = new javax.swing.JMenuItem();
    jSeparator21 = new javax.swing.JPopupMenu.Separator();
    deleteItem = new javax.swing.JMenuItem();
    selectAllItem = new javax.swing.JMenuItem();
    jSeparator22 = new javax.swing.JPopupMenu.Separator();
    jMenuItem2 = new javax.swing.JMenuItem();
    jMenuItem3 = new javax.swing.JMenuItem();
    jSeparator23 = new javax.swing.JPopupMenu.Separator();
    jMenuItem4 = new javax.swing.JMenuItem();
    jMenuItem5 = new javax.swing.JMenuItem();
    jSeparator24 = new javax.swing.JPopupMenu.Separator();
    jMenuItem6 = new javax.swing.JMenuItem();
    jMenuItem1 = new javax.swing.JMenuItem();
    jSeparator11 = new javax.swing.JPopupMenu.Separator();
    clearOutWindowItem = new javax.swing.JMenuItem();
    jMenu3 = new javax.swing.JMenu();
    consoleItem = new javax.swing.JMenuItem();
    historyItem = new javax.swing.JMenuItem();
    filesItem = new javax.swing.JMenuItem();
    workspaceItem = new javax.swing.JMenuItem();
    codeEditorItem = new javax.swing.JMenuItem();
    pathsItem = new javax.swing.JMenuItem();
    pkgsItem = new javax.swing.JMenuItem();
    arrayEditItem = new javax.swing.JMenuItem();
    jMenuItem7 = new javax.swing.JMenuItem();
    jMenu1 = new javax.swing.JMenu();
    findItem = new javax.swing.JMenuItem();
    replaceItem = new javax.swing.JMenuItem();
    gotoItem = new javax.swing.JMenuItem();
    jSeparator25 = new javax.swing.JPopupMenu.Separator();
    googleItem = new javax.swing.JMenuItem();
    wikiItem = new javax.swing.JMenuItem();
    pkgMenu = new javax.swing.JMenu();
    debugMenu = new javax.swing.JMenu();
    runScriptItem = new javax.swing.JMenuItem();
    runScriptCItem = new javax.swing.JMenuItem();
    jMenuItem8 = new javax.swing.JMenuItem();
    jSeparator8 = new javax.swing.JPopupMenu.Separator();
    debugScriptMenuItem = new javax.swing.JMenuItem();
    testScriptMenuItem = new javax.swing.JMenuItem();
    toggleBreakpointItem = new javax.swing.JMenuItem();
    removeToggleBreakpointItem = new javax.swing.JMenuItem();
    clearAllBreakpointsItem = new javax.swing.JMenuItem();
    jSeparator10 = new javax.swing.JPopupMenu.Separator();
    stepItem = new javax.swing.JMenuItem();
    stepInItem = new javax.swing.JMenuItem();
    stepOutItem = new javax.swing.JMenuItem();
    continueItem = new javax.swing.JMenuItem();
    jSeparator5 = new javax.swing.JPopupMenu.Separator();
    finishDebugItem = new javax.swing.JMenuItem();
    toolsMenu = new javax.swing.JMenu();
    fltkplotItem = new javax.swing.JMenuItem();
    octaveCmdItem = new javax.swing.JMenuItem();
    jMenu2 = new javax.swing.JMenu();
    previousWindowItem = new javax.swing.JMenuItem();
    nextWindowItem = new javax.swing.JMenuItem();
    jSeparator29 = new javax.swing.JPopupMenu.Separator();
    closeItem = new javax.swing.JMenuItem();
    closeAllItem = new javax.swing.JMenuItem();
    jSeparator18 = new javax.swing.JPopupMenu.Separator();
    windowsItem = new javax.swing.JMenuItem();
    helpMenu = new javax.swing.JMenu();
    forumItem = new javax.swing.JMenuItem();
    octaveInfoItem = new javax.swing.JMenuItem();
    jSeparator12 = new javax.swing.JPopupMenu.Separator();
    quickHelpItem = new javax.swing.JMenuItem();
    jMenuItem9 = new javax.swing.JMenuItem();
    docPkgItem = new javax.swing.JMenuItem();
    referenceMenu = new javax.swing.JMenu();
    referenceItem = new javax.swing.JMenuItem();
    jSeparator6 = new javax.swing.JPopupMenu.Separator();
    checkForUpdatesMenuItem = new javax.swing.JMenuItem();
    onlineHelpItem = new javax.swing.JMenuItem();
    faqItem = new javax.swing.JMenuItem();
    jSeparator14 = new javax.swing.JPopupMenu.Separator();
    reportBugItem = new javax.swing.JMenuItem();
    feedBackItem = new javax.swing.JMenuItem();
    jSeparator7 = new javax.swing.JPopupMenu.Separator();
    AboutItem = new javax.swing.JMenuItem();

    setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
    java.util.ResourceBundle bundle = java.util.ResourceBundle
            .getBundle("org/domainmath/gui/resources/DomainMath_en"); // NOI18N
    setTitle(bundle.getString("DomainMath.title")); // NOI18N
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);
        }

        public void windowOpened(java.awt.event.WindowEvent evt) {
            formWindowOpened(evt);
        }
    });

    jToolBar1.setRollover(true);
    jToolBar1.setName("Standard"); // NOI18N

    jButton1.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/document-new.png"))); // NOI18N
    jButton1.setFocusable(false);
    jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton1);

    jButton2.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/document-open.png"))); // NOI18N
    jButton2.setFocusable(false);
    jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton2);

    jButton3.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/document-save-all.png"))); // NOI18N
    jButton3.setFocusable(false);
    jButton3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton3.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton3ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton3);
    jToolBar1.add(jSeparator4);

    connectButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/connect.png"))); // NOI18N
    connectButton.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("connectItem.mnemonic").charAt(0));
    connectButton.setToolTipText(bundle.getString("connectItem.tooltip")); // NOI18N
    connectButton.setFocusable(false);
    connectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    connectButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    connectButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            connectButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(connectButton);

    disconnectButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/disconnect.png"))); // NOI18N
    disconnectButton
            .setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
                    .getString("disconnectItem.mnemonic").charAt(0));
    disconnectButton.setToolTipText(bundle.getString("disconnectItem.tooltip")); // NOI18N
    disconnectButton.setFocusable(false);
    disconnectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    disconnectButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    disconnectButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            disconnectButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(disconnectButton);
    jToolBar1.add(jSeparator9);

    jButton4.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-undo.png"))); // NOI18N
    jButton4.setFocusable(false);
    jButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton4.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton4ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton4);

    jButton5.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-redo.png"))); // NOI18N
    jButton5.setFocusable(false);
    jButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton5.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton5.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton5ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton5);
    jToolBar1.add(jSeparator15);

    jButton6.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-cut.png"))); // NOI18N
    jButton6.setFocusable(false);
    jButton6.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton6.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton6.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton6ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton6);

    jButton7.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-copy.png"))); // NOI18N
    jButton7.setFocusable(false);
    jButton7.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton7.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton7.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton7ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton7);

    jButton8.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-paste.png"))); // NOI18N
    jButton8.setFocusable(false);
    jButton8.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton8.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton8.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton8ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton8);
    jToolBar1.add(jSeparator13);

    jLabel1.setText("Current Directory:");

    dirComboBox.setEditable(true);
    dirComboBox.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            dirComboBoxItemStateChanged(evt);
        }
    });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout
            .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addGap(1, 1, 1).addComponent(jLabel1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(dirComboBox, 0, 112, Short.MAX_VALUE).addGap(1, 1, 1)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGap(5, 5, 5).addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1)
                    .addComponent(dirComboBox, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(3, 3, 3)));

    jToolBar1.add(jPanel1);

    folderUpButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/size22x22/go-up.png"))); // NOI18N
    folderUpButton.setToolTipText("Up");
    folderUpButton.setFocusable(false);
    folderUpButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    folderUpButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    folderUpButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            folderUpButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(folderUpButton);

    browseButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/document-open.png"))); // NOI18N
    browseButton.setToolTipText(bundle.getString("browseButton.title")); // NOI18N
    browseButton.setFocusable(false);
    browseButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    browseButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    browseButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            browseButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(browseButton);

    addButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-add.png"))); // NOI18N
    addButton.setToolTipText(bundle.getString("addButton.title")); // NOI18N
    addButton.setFocusable(false);
    addButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    addButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    addButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(addButton);

    getContentPane().add(jToolBar1, java.awt.BorderLayout.PAGE_START);

    fileMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("fileMenu.mnemonic").charAt(0));
    fileMenu.setText(bundle.getString("fileMenu.name")); // NOI18N

    newFileItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N,
            java.awt.event.InputEvent.CTRL_MASK));
    newFileItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-new.png"))); // NOI18N
    newFileItem.setText("New");
    newFileItem.setToolTipText(bundle.getString("newMenuItem.tooltip")); // NOI18N
    newFileItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            newFileItemActionPerformed(evt);
        }
    });
    fileMenu.add(newFileItem);

    openItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O,
            java.awt.event.InputEvent.CTRL_MASK));
    openItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-open.png"))); // NOI18N
    openItem.setText("Open...");
    openItem.setToolTipText("Open File");
    openItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            openItemActionPerformed(evt);
        }
    });
    fileMenu.add(openItem);
    fileMenu.add(jSeparator17);

    saveFileItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S,
            java.awt.event.InputEvent.CTRL_MASK));
    saveFileItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-save.png"))); // NOI18N
    saveFileItem.setText("Save ");
    saveFileItem.setToolTipText(bundle.getString("saveMenuItem.tooltp")); // NOI18N
    saveFileItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveFileItemActionPerformed(evt);
        }
    });
    fileMenu.add(saveFileItem);

    saveAsItem.setText("Save As...");
    saveAsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveAsItemActionPerformed(evt);
        }
    });
    fileMenu.add(saveAsItem);

    savePlotItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("savePlotItem.mnemonic").charAt(0));
    savePlotItem.setText(bundle.getString("savePlotItem.name")); // NOI18N
    savePlotItem.setToolTipText(bundle.getString("savePlotItem.tooltip")); // NOI18N
    savePlotItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            savePlotItemActionPerformed(evt);
        }
    });
    fileMenu.add(savePlotItem);

    saveAllItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    saveAllItem.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/document-save-all.png"))); // NOI18N
    saveAllItem.setText(bundle.getString("saveAllMenuItem.text")); // NOI18N
    saveAllItem.setToolTipText(bundle.getString("saveAllMenuItem.tooltip")); // NOI18N
    saveAllItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveAllItemActionPerformed(evt);
        }
    });
    fileMenu.add(saveAllItem);
    fileMenu.add(jSeparator1);

    printFileItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P,
            java.awt.event.InputEvent.CTRL_MASK));
    printFileItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-print2.png"))); // NOI18N
    printFileItem.setText("Print");
    printFileItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            printFileItemActionPerformed(evt);
        }
    });
    fileMenu.add(printFileItem);

    printItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    printItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("printItem.mnemonic").charAt(0));
    printItem.setText(bundle.getString("printItem.name")); // NOI18N
    printItem.setToolTipText(bundle.getString("printItem.tooltip")); // NOI18N
    printItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            printItemActionPerformed(evt);
        }
    });
    fileMenu.add(printItem);
    fileMenu.add(jSeparator19);

    preferencesItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/preferences.png"))); // NOI18N
    preferencesItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("preferecesItem.mnemonic").charAt(0));
    preferencesItem.setText(bundle.getString("preferencesItem.name")); // NOI18N
    preferencesItem.setToolTipText(bundle.getString("preferencesItem.tooltip")); // NOI18N
    preferencesItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            preferencesItemActionPerformed(evt);
        }
    });
    fileMenu.add(preferencesItem);
    fileMenu.add(jSeparator2);

    connectItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/connect.png"))); // NOI18N
    connectItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("connectItem.mnemonic").charAt(0));
    connectItem.setText(bundle.getString("connectItem.name")); // NOI18N
    connectItem.setToolTipText(bundle.getString("connectItem.tooltip")); // NOI18N
    connectItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            connectItemActionPerformed(evt);
        }
    });
    fileMenu.add(connectItem);

    disconnectItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/disconnect.png"))); // NOI18N
    disconnectItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("disconnectItem.mnemonic").charAt(0));
    disconnectItem.setText(bundle.getString("disconnectItem.name")); // NOI18N
    disconnectItem.setToolTipText(bundle.getString("disconnectItem.tooltip")); // NOI18N
    disconnectItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            disconnectItemActionPerformed(evt);
        }
    });
    fileMenu.add(disconnectItem);
    fileMenu.add(jSeparator3);

    exitItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("exitItem.mnemonic").charAt(0));
    exitItem.setText(bundle.getString("exitItem.name")); // NOI18N
    exitItem.setToolTipText(bundle.getString("exitItem.tooltip")); // NOI18N
    exitItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exitItemActionPerformed(evt);
        }
    });
    fileMenu.add(exitItem);

    jMenuBar1.add(fileMenu);

    editMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("editMenu.mnemonic").charAt(0));
    editMenu.setText("Edit");

    undoItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z,
            java.awt.event.InputEvent.CTRL_MASK));
    undoItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-undo.png"))); // NOI18N
    undoItem.setText("Undo");
    undoItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            undoItemActionPerformed(evt);
        }
    });
    editMenu.add(undoItem);

    redoItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Y,
            java.awt.event.InputEvent.CTRL_MASK));
    redoItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-redo.png"))); // NOI18N
    redoItem.setText("Redo");
    redoItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            redoItemActionPerformed(evt);
        }
    });
    editMenu.add(redoItem);
    editMenu.add(jSeparator20);

    cutItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X,
            java.awt.event.InputEvent.CTRL_MASK));
    cutItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-cut.png"))); // NOI18N
    cutItem.setText("Cut");
    cutItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cutItemActionPerformed(evt);
        }
    });
    editMenu.add(cutItem);

    copyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C,
            java.awt.event.InputEvent.CTRL_MASK));
    copyItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-copy.png"))); // NOI18N
    copyItem.setText("Copy");
    copyItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            copyItemActionPerformed(evt);
        }
    });
    editMenu.add(copyItem);

    pasteItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V,
            java.awt.event.InputEvent.CTRL_MASK));
    pasteItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-paste.png"))); // NOI18N
    pasteItem.setText("Paste");
    pasteItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pasteItemActionPerformed(evt);
        }
    });
    editMenu.add(pasteItem);
    editMenu.add(jSeparator21);

    deleteItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-delete.png"))); // NOI18N
    deleteItem.setText("Delete");
    deleteItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            deleteItemActionPerformed(evt);
        }
    });
    editMenu.add(deleteItem);

    selectAllItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A,
            java.awt.event.InputEvent.CTRL_MASK));
    selectAllItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-select-all.png"))); // NOI18N
    selectAllItem.setText("Select All");
    selectAllItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            selectAllItemActionPerformed(evt);
        }
    });
    editMenu.add(selectAllItem);
    editMenu.add(jSeparator22);

    jMenuItem2.setAction(new RSyntaxTextAreaEditorKit.InsertTabAction());
    jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_TAB,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem2.setText("Increase Indent");
    editMenu.add(jMenuItem2);

    jMenuItem3.setAction(new RSyntaxTextAreaEditorKit.DecreaseIndentAction());
    jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_TAB,
            java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem3.setText("Decrease Indent");
    editMenu.add(jMenuItem3);
    editMenu.add(jSeparator23);

    jMenuItem4.setAction(new RTextAreaEditorKit.UpperSelectionCaseAction());
    jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem4.setText("Make Uppercase");
    editMenu.add(jMenuItem4);

    jMenuItem5.setAction(new RTextAreaEditorKit.LowerSelectionCaseAction());
    jMenuItem5.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem5.setText("Make Lowercase");
    editMenu.add(jMenuItem5);
    editMenu.add(jSeparator24);

    jMenuItem6.setText("Clear All Marks...");
    jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem6ActionPerformed(evt);
        }
    });
    editMenu.add(jMenuItem6);

    jMenuItem1.setAction(new RSyntaxTextAreaEditorKit.ToggleCommentAction());
    jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_SLASH,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem1.setText("Toggle Comment");
    jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem1ActionPerformed(evt);
        }
    });
    editMenu.add(jMenuItem1);
    editMenu.add(jSeparator11);

    clearOutWindowItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W,
            java.awt.event.InputEvent.CTRL_MASK));
    clearOutWindowItem
            .setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
                    .getString("clearOutputWindowItem.mnemonic").charAt(0));
    clearOutWindowItem.setText(bundle.getString("clearOutputWindowItem.name")); // NOI18N
    clearOutWindowItem.setToolTipText(bundle.getString("clearOutputWindowItem.tooltip")); // NOI18N
    clearOutWindowItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clearOutWindowItemActionPerformed(evt);
        }
    });
    editMenu.add(clearOutWindowItem);

    jMenuBar1.add(editMenu);

    jMenu3.setText(bundle.getString("viewMenu.title")); // NOI18N

    consoleItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_0,
            java.awt.event.InputEvent.CTRL_MASK));
    consoleItem.setText(bundle.getString("consoleItem.title")); // NOI18N
    consoleItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            consoleItemActionPerformed(evt);
        }
    });
    jMenu3.add(consoleItem);

    historyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_1,
            java.awt.event.InputEvent.CTRL_MASK));
    historyItem.setText(bundle.getString("historyItem.title")); // NOI18N
    historyItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            historyItemActionPerformed(evt);
        }
    });
    jMenu3.add(historyItem);

    filesItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_2,
            java.awt.event.InputEvent.CTRL_MASK));
    filesItem.setText(bundle.getString("filesItem.title")); // NOI18N
    filesItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            filesItemActionPerformed(evt);
        }
    });
    jMenu3.add(filesItem);

    workspaceItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_3,
            java.awt.event.InputEvent.CTRL_MASK));
    workspaceItem.setText(bundle.getString("worksaceItem.title")); // NOI18N
    workspaceItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            workspaceItemActionPerformed(evt);
        }
    });
    jMenu3.add(workspaceItem);

    codeEditorItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_4,
            java.awt.event.InputEvent.CTRL_MASK));
    codeEditorItem.setText(bundle.getString("codeEditorItem.title")); // NOI18N
    codeEditorItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            codeEditorItemActionPerformed(evt);
        }
    });
    jMenu3.add(codeEditorItem);

    pathsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_5,
            java.awt.event.InputEvent.CTRL_MASK));
    pathsItem.setText(bundle.getString("setPathsItem.title")); // NOI18N
    pathsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pathsItemActionPerformed(evt);
        }
    });
    jMenu3.add(pathsItem);

    pkgsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_6,
            java.awt.event.InputEvent.CTRL_MASK));
    pkgsItem.setText(bundle.getString("pkgsItem.title")); // NOI18N
    pkgsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pkgsItemActionPerformed(evt);
        }
    });
    jMenu3.add(pkgsItem);

    arrayEditItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_7,
            java.awt.event.InputEvent.CTRL_MASK));
    arrayEditItem.setText(bundle.getString("arrayEidtorItem.title")); // NOI18N
    arrayEditItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            arrayEditItemActionPerformed(evt);
        }
    });
    jMenu3.add(arrayEditItem);

    jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_8,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem7.setText("Debugger Window");
    jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem7ActionPerformed(evt);
        }
    });
    jMenu3.add(jMenuItem7);

    jMenuBar1.add(jMenu3);

    jMenu1.setMnemonic('S');
    jMenu1.setText("Search");

    findItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F,
            java.awt.event.InputEvent.CTRL_MASK));
    findItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-find.png"))); // NOI18N
    findItem.setMnemonic('F');
    findItem.setText("Find...");
    findItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            findItemActionPerformed(evt);
        }
    });
    jMenu1.add(findItem);

    replaceItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H,
            java.awt.event.InputEvent.CTRL_MASK));
    replaceItem.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/edit-find-replace.png"))); // NOI18N
    replaceItem.setText("Replace...");
    replaceItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            replaceItemActionPerformed(evt);
        }
    });
    jMenu1.add(replaceItem);

    gotoItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    gotoItem.setText("Go To...");
    gotoItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            gotoItemActionPerformed(evt);
        }
    });
    jMenu1.add(gotoItem);
    jMenu1.add(jSeparator25);

    googleItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G,
            java.awt.event.InputEvent.CTRL_MASK));
    googleItem.setText("Google Search");
    googleItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            googleItemActionPerformed(evt);
        }
    });
    jMenu1.add(googleItem);

    wikiItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    wikiItem.setText("Wikipedia Search");
    wikiItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            wikiItemActionPerformed(evt);
        }
    });
    jMenu1.add(wikiItem);

    jMenuBar1.add(jMenu1);

    pkgMenu.setText(bundle.getString("pkgMenu.name")); // NOI18N
    jMenuBar1.add(pkgMenu);

    debugMenu.setText("Debug");

    runScriptItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F6, 0));
    runScriptItem
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/Run.png"))); // NOI18N
    runScriptItem.setText("Run Script");
    runScriptItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            runScriptItemActionPerformed(evt);
        }
    });
    debugMenu.add(runScriptItem);

    runScriptCItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F6,
            java.awt.event.InputEvent.SHIFT_MASK));
    runScriptCItem.setText("Run Script from Console");
    runScriptCItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            runScriptCItemActionPerformed(evt);
        }
    });
    debugMenu.add(runScriptCItem);

    jMenuItem8.setText("Edit Run Configuration");
    jMenuItem8.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem8ActionPerformed(evt);
        }
    });
    debugMenu.add(jMenuItem8);
    debugMenu.add(jSeparator8);

    debugScriptMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5,
            java.awt.event.InputEvent.CTRL_MASK));
    debugScriptMenuItem.setText("Debug Script");
    debugScriptMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            debugScriptMenuItemActionPerformed(evt);
        }
    });
    debugMenu.add(debugScriptMenuItem);

    testScriptMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    testScriptMenuItem.setText("Test Script");
    testScriptMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            testScriptMenuItemActionPerformed(evt);
        }
    });
    debugMenu.add(testScriptMenuItem);

    toggleBreakpointItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9, 0));
    toggleBreakpointItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/resources/stop.png"))); // NOI18N
    toggleBreakpointItem.setText("Toggle Breakpoint");
    toggleBreakpointItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            toggleBreakpointItemActionPerformed(evt);
        }
    });
    debugMenu.add(toggleBreakpointItem);

    removeToggleBreakpointItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9,
            java.awt.event.InputEvent.SHIFT_MASK));
    removeToggleBreakpointItem.setText("Remove Toggle Breakpoint");
    removeToggleBreakpointItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            removeToggleBreakpointItemActionPerformed(evt);
        }
    });
    debugMenu.add(removeToggleBreakpointItem);

    clearAllBreakpointsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    clearAllBreakpointsItem.setText("Clear All Breakpoints...");
    clearAllBreakpointsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clearAllBreakpointsItemActionPerformed(evt);
        }
    });
    debugMenu.add(clearAllBreakpointsItem);
    debugMenu.add(jSeparator10);

    stepItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F10,
            java.awt.event.InputEvent.SHIFT_MASK));
    stepItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/step.png"))); // NOI18N
    stepItem.setText("Step");
    stepItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stepItemActionPerformed(evt);
        }
    });
    debugMenu.add(stepItem);

    stepInItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F11, 0));
    stepInItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/step-in.png"))); // NOI18N
    stepInItem.setText("Step in");
    stepInItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stepInItemActionPerformed(evt);
        }
    });
    debugMenu.add(stepInItem);

    stepOutItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F11,
            java.awt.event.InputEvent.SHIFT_MASK));
    stepOutItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/step-out.png"))); // NOI18N
    stepOutItem.setText("Step out");
    stepOutItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stepOutItemActionPerformed(evt);
        }
    });
    debugMenu.add(stepOutItem);

    continueItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F8, 0));
    continueItem.setText("Continue");
    continueItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            continueItemActionPerformed(evt);
        }
    });
    debugMenu.add(continueItem);
    debugMenu.add(jSeparator5);

    finishDebugItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5,
            java.awt.event.InputEvent.SHIFT_MASK));
    finishDebugItem
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/finish.png"))); // NOI18N
    finishDebugItem.setText("Finish Debugger Session");
    finishDebugItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            finishDebugItemActionPerformed(evt);
        }
    });
    debugMenu.add(finishDebugItem);

    jMenuBar1.add(debugMenu);

    toolsMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("ToolsMenu.mnemonic").charAt(0));
    toolsMenu.setText(bundle.getString("ToolsMenu.name")); // NOI18N

    fltkplotItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    fltkplotItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("fltkPlotItem.mnemonic").charAt(0));
    fltkplotItem.setText(bundle.getString("fltkPlotItem.name")); // NOI18N
    fltkplotItem.setToolTipText(bundle.getString("fltkPlotItem.tooltip")); // NOI18N
    fltkplotItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            fltkplotItemActionPerformed(evt);
        }
    });
    toolsMenu.add(fltkplotItem);

    octaveCmdItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("octaveCmdItem.mnemonic").charAt(0));
    octaveCmdItem.setText(bundle.getString("octaveCmdItem.name")); // NOI18N
    octaveCmdItem.setToolTipText(bundle.getString("octaveCmdItem.tooltip")); // NOI18N
    octaveCmdItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            octaveCmdItemActionPerformed(evt);
        }
    });
    toolsMenu.add(octaveCmdItem);

    jMenuBar1.add(toolsMenu);

    jMenu2.setText(bundle.getString("windowMenu.title")); // NOI18N

    previousWindowItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PAGE_DOWN,
            java.awt.event.InputEvent.CTRL_MASK));
    previousWindowItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/go-previous.png"))); // NOI18N
    previousWindowItem.setText(bundle.getString("previousWindowItem.title")); // NOI18N
    previousWindowItem.setToolTipText(bundle.getString("previousWindowItem.tooltip")); // NOI18N
    previousWindowItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            previousWindowItemActionPerformed(evt);
        }
    });
    jMenu2.add(previousWindowItem);

    nextWindowItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PAGE_UP,
            java.awt.event.InputEvent.CTRL_MASK));
    nextWindowItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/go-next.png"))); // NOI18N
    nextWindowItem.setText(bundle.getString("nextWindowItem.title")); // NOI18N
    nextWindowItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            nextWindowItemActionPerformed(evt);
        }
    });
    jMenu2.add(nextWindowItem);
    jMenu2.add(jSeparator29);

    closeItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W,
            java.awt.event.InputEvent.ALT_MASK));
    closeItem.setText(bundle.getString("closeMenuItem.name")); // NOI18N
    closeItem.setToolTipText(bundle.getString("closeItem.tooltip")); // NOI18N
    closeItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            closeItemActionPerformed(evt);
        }
    });
    jMenu2.add(closeItem);

    closeAllItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W,
            java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.SHIFT_MASK));
    closeAllItem.setText(bundle.getString("closeAllItem.name")); // NOI18N
    closeAllItem.setToolTipText(bundle.getString("closeAllItem.tooltip")); // NOI18N
    closeAllItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            closeAllItemActionPerformed(evt);
        }
    });
    jMenu2.add(closeAllItem);
    jMenu2.add(jSeparator18);

    windowsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4,
            java.awt.event.InputEvent.SHIFT_MASK));
    windowsItem.setText(bundle.getString("windowsItem.title")); // NOI18N
    windowsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            windowsItemActionPerformed(evt);
        }
    });
    jMenu2.add(windowsItem);

    jMenuBar1.add(jMenu2);

    helpMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("helpMenu.mnemonic").charAt(0));
    helpMenu.setText(bundle.getString("helpMenu.name")); // NOI18N

    forumItem.setText("Forum");
    forumItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            forumItemActionPerformed(evt);
        }
    });
    helpMenu.add(forumItem);

    octaveInfoItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("octInfoItem.mnemonic").charAt(0));
    octaveInfoItem.setText(bundle.getString("octInfoItem.name")); // NOI18N
    octaveInfoItem.setToolTipText(bundle.getString("octInfoItem.tooltip")); // NOI18N
    octaveInfoItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            octaveInfoItemActionPerformed(evt);
        }
    });
    helpMenu.add(octaveInfoItem);
    helpMenu.add(jSeparator12);

    quickHelpItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
    quickHelpItem.setText(bundle.getString("quickHelpItem.name")); // NOI18N
    quickHelpItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            quickHelpItemActionPerformed(evt);
        }
    });
    helpMenu.add(quickHelpItem);

    jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1,
            java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem9.setText("Package  Documentation");
    jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem9ActionPerformed(evt);
        }
    });
    helpMenu.add(jMenuItem9);

    docPkgItem.setText("Package Online  Documentation");
    docPkgItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            docPkgItemActionPerformed(evt);
        }
    });
    helpMenu.add(docPkgItem);

    referenceMenu.setText(bundle.getString("referencesMenu.name")); // NOI18N
    helpMenu.add(referenceMenu);

    referenceItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("addReferencesItem.mnemonic").charAt(0));
    referenceItem.setText(bundle.getString("addReferencesItem.name")); // NOI18N
    referenceItem.setToolTipText(bundle.getString("addReferencesItem.tooltip")); // NOI18N
    referenceItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            referenceItemActionPerformed(evt);
        }
    });
    helpMenu.add(referenceItem);
    helpMenu.add(jSeparator6);

    checkForUpdatesMenuItem.setText(bundle.getString("checkForUpdatesMenuItem.text")); // NOI18N
    checkForUpdatesMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkForUpdatesMenuItemActionPerformed(evt);
        }
    });
    helpMenu.add(checkForUpdatesMenuItem);

    onlineHelpItem.setText("Help and Support");
    onlineHelpItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            onlineHelpItemActionPerformed(evt);
        }
    });
    helpMenu.add(onlineHelpItem);

    faqItem.setText("Online FAQ");
    faqItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            faqItemActionPerformed(evt);
        }
    });
    helpMenu.add(faqItem);
    helpMenu.add(jSeparator14);

    reportBugItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("reportBugItem.mnemonic").charAt(0));
    reportBugItem.setText(bundle.getString("reportBugItem.name")); // NOI18N
    reportBugItem.setToolTipText(bundle.getString("reportBugItem.tooltip")); // NOI18N
    reportBugItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            reportBugItemActionPerformed(evt);
        }
    });
    helpMenu.add(reportBugItem);

    feedBackItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("yourFeedbackItem.mnemonic").charAt(0));
    feedBackItem.setText(bundle.getString("yourFeedbackItem.name")); // NOI18N
    feedBackItem.setToolTipText(bundle.getString("yourFeedbackItem.tooltip")); // NOI18N
    feedBackItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            feedBackItemActionPerformed(evt);
        }
    });
    helpMenu.add(feedBackItem);
    helpMenu.add(jSeparator7);

    AboutItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("aboutItem.mnemonic").charAt(0));
    AboutItem.setText(bundle.getString("aboutItem.name")); // NOI18N
    AboutItem.setToolTipText(bundle.getString("aboutItem.tooltip")); // NOI18N
    AboutItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            AboutItemActionPerformed(evt);
        }
    });
    helpMenu.add(AboutItem);

    jMenuBar1.add(helpMenu);

    setJMenuBar(jMenuBar1);

    pack();
}

From source file:org.drools.planner.examples.cloudbalancing.swingui.CloudBalancingPanel.java

public CloudBalancingPanel() {
    GroupLayout layout = new GroupLayout(this);
    setLayout(layout);/*from  w  w w.  j a  v a  2  s .com*/
    JPanel headerPanel = createHeaderPanel();
    JPanel computersPanel = createComputersPanel();
    layout.setHorizontalGroup(
            layout.createParallelGroup().addComponent(headerPanel).addComponent(computersPanel));
    layout.setVerticalGroup(layout.createSequentialGroup()
            .addComponent(headerPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                    GroupLayout.PREFERRED_SIZE)
            .addComponent(computersPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                    GroupLayout.PREFERRED_SIZE));
}

From source file:org.drools.planner.examples.machinereassignment.swingui.MachineReassignmentPanel.java

public MachineReassignmentPanel() {
    GroupLayout layout = new GroupLayout(this);
    setLayout(layout);// w  w w . j a  va 2  s  . co m
    createMachineListPanel();
    JPanel headerPanel = new JPanel();
    layout.setHorizontalGroup(
            layout.createParallelGroup().addComponent(headerPanel).addComponent(machineListPanel));
    layout.setVerticalGroup(layout.createSequentialGroup()
            .addComponent(headerPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                    GroupLayout.PREFERRED_SIZE)
            .addComponent(machineListPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                    GroupLayout.PREFERRED_SIZE));
}

From source file:org.drools.planner.examples.nurserostering.swingui.NurseRosteringPanel.java

public NurseRosteringPanel() {
    GroupLayout layout = new GroupLayout(this);
    setLayout(layout);//from   w w  w.j  a  va2  s  .co m
    createEmployeeListPanel();
    JPanel headerPanel = createHeaderPanel();
    layout.setHorizontalGroup(
            layout.createParallelGroup().addComponent(headerPanel).addComponent(employeeListPanel));
    layout.setVerticalGroup(layout.createSequentialGroup()
            .addComponent(headerPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                    GroupLayout.PREFERRED_SIZE)
            .addComponent(employeeListPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                    GroupLayout.PREFERRED_SIZE));
}

From source file:org.gitools.ui.platform.dialog.ExceptionGlassPane.java

@SuppressWarnings("unchecked")
private void initComponents() {

    closeButton = new javax.swing.JButton();
    copyButton = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    descriptionArea = new javax.swing.JTextArea();
    jScrollPane2 = new javax.swing.JScrollPane();
    traceArea = new javax.swing.JTextArea();
    jSeparator1 = new javax.swing.JSeparator();

    closeButton.setText("Close");
    closeButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            closeButtonActionPerformed(evt);
        }//  ww w.  j a v  a2  s . com
    });

    copyButton.setText("Copy");
    copyButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            copyButtonActionPerformed(evt);
        }
    });

    jLabel1.setText("Error");

    jLabel2.setText("Trace (for developers)");

    descriptionArea.setColumns(20);
    descriptionArea.setEditable(false);
    descriptionArea.setRows(2);
    jScrollPane1.setViewportView(descriptionArea);

    traceArea.setColumns(20);
    traceArea.setRows(5);
    jScrollPane2.setViewportView(traceArea);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(
                            layout.createSequentialGroup()
                                    .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 451,
                                            Short.MAX_VALUE)
                                    .addGap(180, 180, 180))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, 619, Short.MAX_VALUE)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout
                                            .createSequentialGroup().addComponent(copyButton)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                    521, Short.MAX_VALUE)
                                            .addComponent(closeButton))
                                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, 619, Short.MAX_VALUE))
                            .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, 619, Short.MAX_VALUE)
                                    .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 619,
                                            Short.MAX_VALUE))
                            .addContainerGap()))));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap().addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 59,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18).addComponent(jLabel2)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(copyButton).addComponent(closeButton))
                    .addContainerGap()));

    //pack();
}