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:com.ga.forms.DailyLogUI.java

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

    jPanel1 = new javax.swing.JPanel();
    mainTitleLbl = new javax.swing.JLabel();
    jSeparator1 = new javax.swing.JSeparator();
    exitButton = new javax.swing.JButton();
    exportButton = new javax.swing.JButton();
    dailyLogPanel = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    dailyLogTable = new javax.swing.JTable();
    addButton = new javax.swing.JButton();
    analysisPanel = new javax.swing.JPanel();
    netDurationLbl = new javax.swing.JLabel();
    durationLbl = new javax.swing.JLabel();
    monthlyRequiredDurationLbl = new javax.swing.JLabel();
    monthlyDurationLbl = new javax.swing.JLabel();
    durationDifferenceLbl = new javax.swing.JLabel();
    differenceLbl = new javax.swing.JLabel();
    monthCombo = new javax.swing.JComboBox();
    yearCombo = new javax.swing.JComboBox();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

    jPanel1.setMaximumSize(new java.awt.Dimension(395, 389));
    jPanel1.setMinimumSize(new java.awt.Dimension(395, 389));
    jPanel1.setPreferredSize(new java.awt.Dimension(464, 474));

    mainTitleLbl.setFont(new java.awt.Font("Arial", 0, 36)); // NOI18N
    mainTitleLbl.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    mainTitleLbl.setText("Daily Log Manager");
    mainTitleLbl.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

    exitButton.setText("Exit");
    exitButton.setMaximumSize(new java.awt.Dimension(72, 29));
    exitButton.setMinimumSize(new java.awt.Dimension(72, 29));
    exitButton.setPreferredSize(new java.awt.Dimension(72, 29));
    exitButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exitButtonActionPerformed(evt);
        }
    });

    exportButton.setText("Export");
    exportButton.setMaximumSize(new java.awt.Dimension(92, 29));
    exportButton.setMinimumSize(new java.awt.Dimension(92, 29));
    exportButton.setPreferredSize(new java.awt.Dimension(92, 29));
    exportButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportButtonActionPerformed(evt);
        }
    });

    dailyLogPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Daily Logs"));
    dailyLogPanel.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    dailyLogPanel.setName("Daily Log Entry"); // NOI18N
    dailyLogPanel.setPreferredSize(new java.awt.Dimension(240, 190));

    jScrollPane1.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N

    dailyLogTable
            .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" }));
    jScrollPane1.setViewportView(dailyLogTable);

    javax.swing.GroupLayout dailyLogPanelLayout = new javax.swing.GroupLayout(dailyLogPanel);
    dailyLogPanel.setLayout(dailyLogPanelLayout);
    dailyLogPanelLayout.setHorizontalGroup(
            dailyLogPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 770, Short.MAX_VALUE));
    dailyLogPanelLayout
            .setVerticalGroup(dailyLogPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE));

    addButton.setText("Add");
    addButton.setMaximumSize(new java.awt.Dimension(72, 29));
    addButton.setMinimumSize(new java.awt.Dimension(72, 29));
    addButton.setPreferredSize(new java.awt.Dimension(72, 29));
    addButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addButtonActionPerformed(evt);
        }
    });

    analysisPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Analysis"));

    netDurationLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
    netDurationLbl.setText("NET DURATION:");

    durationLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N

    monthlyRequiredDurationLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
    monthlyRequiredDurationLbl.setText("MONTHLY REQUIRED DURATION:");

    monthlyDurationLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N

    durationDifferenceLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
    durationDifferenceLbl.setText("DIFFERENCE:");

    differenceLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N

    javax.swing.GroupLayout analysisPanelLayout = new javax.swing.GroupLayout(analysisPanel);
    analysisPanel.setLayout(analysisPanelLayout);
    analysisPanelLayout.setHorizontalGroup(analysisPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(analysisPanelLayout.createSequentialGroup().addContainerGap().addGroup(analysisPanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(analysisPanelLayout.createSequentialGroup().addComponent(netDurationLbl)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(durationLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 71,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(
                            analysisPanelLayout.createSequentialGroup().addComponent(monthlyRequiredDurationLbl)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(monthlyDurationLbl, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            71, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(analysisPanelLayout.createSequentialGroup().addComponent(durationDifferenceLbl)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(differenceLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 71,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(18, Short.MAX_VALUE)));
    analysisPanelLayout
            .setVerticalGroup(analysisPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(analysisPanelLayout.createSequentialGroup().addContainerGap()
                            .addGroup(analysisPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(netDurationLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(durationLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(analysisPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(monthlyDurationLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(monthlyRequiredDurationLbl))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(analysisPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(differenceLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(durationDifferenceLbl))
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    netDurationLbl.getAccessibleContext().setAccessibleName("netDurationLbl");
    durationLbl.getAccessibleContext().setAccessibleName("durationLbl");
    monthlyRequiredDurationLbl.getAccessibleContext().setAccessibleName("monthlyRequiredDurationLbl");
    monthlyDurationLbl.getAccessibleContext().setAccessibleName("monthlyDurationLbl");
    durationDifferenceLbl.getAccessibleContext().setAccessibleName("durationDifferenceLbl");
    differenceLbl.getAccessibleContext().setAccessibleName("differenceLbl");

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

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

    jLabel1.setText("Month:");

    jLabel2.setText("Year:");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jSeparator1)
            .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(addButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(exitButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup().addGap(6, 6, 6)
                            .addGroup(jPanel1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                            .addComponent(analysisPanel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jLabel1)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(monthCombo, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(24, 24, 24).addComponent(jLabel2)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(yearCombo, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(mainTitleLbl, javax.swing.GroupLayout.Alignment.TRAILING,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(dailyLogPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 788,
                                            Short.MAX_VALUE))))
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addComponent(mainTitleLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 70,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(dailyLogPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 206,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(analysisPanel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(monthCombo, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(yearCombo, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel1).addComponent(jLabel2)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 6,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(exitButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(addButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));

    exportButton.getAccessibleContext().setAccessibleName("exportButton");
    addButton.getAccessibleContext().setAccessibleName("addButton");
    analysisPanel.getAccessibleContext().setAccessibleName("analysisPanel");
    jLabel1.getAccessibleContext().setAccessibleName("monthLbl");
    jLabel2.getAccessibleContext().setAccessibleName("yearLbl");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 800, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 800, Short.MAX_VALUE)));
    layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGap(0, 469, Short.MAX_VALUE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 469,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(0, 0, Short.MAX_VALUE))));

    pack();
}

From source file:de.tor.tribes.ui.views.DSWorkbenchRankFrame.java

/** This method is called from within the constructor to
 * initialize the form.// w ww . java2 s . 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() {
    java.awt.GridBagConstraints gridBagConstraints;

    jXRankPanel = new org.jdesktop.swingx.JXPanel();
    jRankTabPane = new javax.swing.JTabbedPane();
    jxSearchPane = new org.jdesktop.swingx.JXPanel();
    jXPanel2 = new org.jdesktop.swingx.JXPanel();
    jButton12 = new javax.swing.JButton();
    jTextField1 = new javax.swing.JTextField();
    jLabel21 = new javax.swing.JLabel();
    jFilterRows = new javax.swing.JCheckBox();
    jFilterCaseSensitive = new javax.swing.JCheckBox();
    jScrollPane2 = new javax.swing.JScrollPane();
    jXColumnList = new org.jdesktop.swingx.JXList();
    jLabel22 = new javax.swing.JLabel();
    jAlwaysOnTop = new javax.swing.JCheckBox();
    jRankPanel = new javax.swing.JPanel();
    capabilityInfoPanel1 = new de.tor.tribes.ui.components.CapabilityInfoPanel();

    jXRankPanel.setLayout(new java.awt.BorderLayout());
    jXRankPanel.add(jRankTabPane, java.awt.BorderLayout.CENTER);

    jxSearchPane.setOpaque(false);
    jxSearchPane.setLayout(new java.awt.GridBagLayout());

    jXPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jXPanel2.setInheritAlpha(false);

    jButton12.setText("Anwenden");
    jButton12.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseReleased(java.awt.event.MouseEvent evt) {
            jButton12fireHideGlassPaneEvent(evt);
        }
    });

    jTextField1.addCaretListener(new javax.swing.event.CaretListener() {
        public void caretUpdate(javax.swing.event.CaretEvent evt) {
            jTextField1fireHighlightEvent(evt);
        }
    });

    jLabel21.setText("Suchbegriff");

    jFilterRows.setText("Nur gefilterte Zeilen anzeigen");
    jFilterRows.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            jFilterRowsfireUpdateFilterEvent(evt);
        }
    });

    jFilterCaseSensitive.setText("Gro-/Kleinschreibung beachten");
    jFilterCaseSensitive.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            jFilterCaseSensitivefireUpdateFilterEvent(evt);
        }
    });

    jXColumnList.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];
        }
    });
    jXColumnList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    jScrollPane2.setViewportView(jXColumnList);

    jLabel22.setText("Spalten");

    javax.swing.GroupLayout jXPanel2Layout = new javax.swing.GroupLayout(jXPanel2);
    jXPanel2.setLayout(jXPanel2Layout);
    jXPanel2Layout
            .setHorizontalGroup(jXPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            jXPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jXPanel2Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jLabel22, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(
                                            jLabel21, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addGap(18, 18, 18)
                                    .addGroup(jXPanel2Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jXPanel2Layout.createSequentialGroup()
                                                    .addComponent(jScrollPane2,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 158,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(18, 18, 18)
                                                    .addGroup(jXPanel2Layout
                                                            .createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.TRAILING)
                                                            .addGroup(jXPanel2Layout.createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.TRAILING,
                                                                    false)
                                                                    .addComponent(jFilterRows,
                                                                            javax.swing.GroupLayout.Alignment.LEADING,
                                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                            Short.MAX_VALUE)
                                                                    .addComponent(jFilterCaseSensitive,
                                                                            javax.swing.GroupLayout.Alignment.LEADING,
                                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                            Short.MAX_VALUE))
                                                            .addComponent(jButton12)))
                                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    355, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jXPanel2Layout.setVerticalGroup(jXPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jXPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jXPanel2Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel21)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jXPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jXPanel2Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jXPanel2Layout
                                            .createSequentialGroup().addComponent(jFilterCaseSensitive)
                                            .addPreferredGap(
                                                    javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jFilterRows)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jButton12))
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 164,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jLabel22))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jxSearchPane.add(jXPanel2, new java.awt.GridBagConstraints());

    setTitle("Rangliste");
    getContentPane().setLayout(new java.awt.GridBagLayout());

    jAlwaysOnTop.setText("Immer im Vordergrund");
    jAlwaysOnTop.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            fireRankFrameAlwaysOnTopEvent(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    getContentPane().add(jAlwaysOnTop, gridBagConstraints);

    jRankPanel.setBackground(new java.awt.Color(239, 235, 223));
    jRankPanel.setPreferredSize(new java.awt.Dimension(300, 400));
    jRankPanel.setLayout(new java.awt.BorderLayout());
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipadx = 668;
    gridBagConstraints.ipady = 471;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(jRankPanel, gridBagConstraints);

    capabilityInfoPanel1.setBbSupport(false);
    capabilityInfoPanel1.setCopyable(false);
    capabilityInfoPanel1.setDeletable(false);
    capabilityInfoPanel1.setPastable(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    getContentPane().add(capabilityInfoPanel1, gridBagConstraints);

    pack();
}

From source file:com.josescalia.tumblr.form.PreferenceForm.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 w w .j  ava2 s. co  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    rbGroupUseProxy = new ButtonGroup();
    folderChooser = new JFileChooser();
    jTabbedPane1 = new JTabbedPane();
    jPanel1 = new JPanel();
    jPanel10 = new JPanel();
    jLabel29 = new JLabel();
    jLabel26 = new JLabel();
    jLabel25 = new JLabel();
    jLabel24 = new JLabel();
    jLabel28 = new JLabel();
    jLabel27 = new JLabel();
    jPanel12 = new JPanel();
    txtProxyPort = new JTextField();
    rbUseProxy = new JRadioButton();
    jLabel2 = new JLabel();
    rbNoProxy = new JRadioButton();
    txtProxyPassword = new JPasswordField();
    jLabel3 = new JLabel();
    txtProxyUsername = new JTextField();
    btnSaveProxyConfig = new JButton();
    jLabel1 = new JLabel();
    jLabel4 = new JLabel();
    txtProxyHost = new JTextField();
    checkProxyNeedAuth = new JCheckBox();
    jPanel2 = new JPanel();
    jPanel11 = new JPanel();
    jLabel35 = new JLabel();
    jLabel30 = new JLabel();
    jLabel33 = new JLabel();
    jLabel32 = new JLabel();
    jLabel31 = new JLabel();
    jLabel34 = new JLabel();
    jPanel14 = new JPanel();
    txtDefaultFolderPath1 = new JTextField();
    jLabel6 = new JLabel();
    txtDefaultFolderPath = new JTextField();
    jLabel7 = new JLabel();
    btnChooseFolder = new JButton();
    btnSaveAppConfig = new JButton();
    jPanel7 = new JPanel();
    jPanel9 = new JPanel();
    jLabel18 = new JLabel();
    jLabel23 = new JLabel();
    jLabel19 = new JLabel();
    jLabel21 = new JLabel();
    jLabel20 = new JLabel();
    jLabel22 = new JLabel();
    jPanel13 = new JPanel();
    jLabel8 = new JLabel();
    btnOpenOtherCacheFolder = new JButton();
    btnDeleteCache = new JButton();
    jLabel9 = new JLabel();
    txtTotalFileSize1 = new JTextField();
    txtTotalFileSize = new JTextField();
    jPanel3 = new JPanel();
    jPanel5 = new JPanel();
    txtTotalLogSize = new JTextField();
    jLabel11 = new JLabel();
    txtTotalLog = new JTextField();
    btnCleanLog = new JButton();
    jLabel13 = new JLabel();
    jPanel6 = new JPanel();
    jLabel12 = new JLabel();
    jScrollPane1 = new JScrollPane();
    txtLogContent = new JTextArea();
    jPanel8 = new JPanel();
    jLabel17 = new JLabel();
    jLabel16 = new JLabel();
    jLabel15 = new JLabel();
    jLabel14 = new JLabel();
    jPanel4 = new JPanel();
    jPanel15 = new JPanel();
    txtAppLookAndFeel = new JTextField();
    jLabel10 = new JLabel();
    btnSaveLF = new JButton();
    btnSelectLF = new JButton();
    jPanel16 = new JPanel();
    jLabel41 = new JLabel();
    jLabel36 = new JLabel();
    jLabel40 = new JLabel();
    jLabel37 = new JLabel();
    jLabel38 = new JLabel();
    jLabel39 = new JLabel();
    jLabel5 = new JLabel();

    jPanel1.setBorder(BorderFactory.createEtchedBorder());

    jPanel10.setBackground(Color.white);
    jPanel10.setBorder(BorderFactory.createEtchedBorder());

    jLabel29.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel29.setText("set up this Proxy Connection.");

    jLabel26.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel26.setText("if this application need to connect to the internet. The setting of this ");

    jLabel25.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel25.setText("The Proxy Connection is a set of configuration which will be applied");

    jLabel24.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel24.setText("Info :");

    jLabel28.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel28.setText("configuration. Contact Computer Network Administrator to correctly");

    jLabel27.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel27.setText("Proxy Connection should be match with the computer network");

    GroupLayout jPanel10Layout = new GroupLayout(jPanel10);
    jPanel10.setLayout(jPanel10Layout);
    jPanel10Layout.setHorizontalGroup(jPanel10Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel10Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel28).addComponent(jLabel25).addComponent(jLabel24)
                            .addComponent(jLabel26).addComponent(jLabel27).addComponent(jLabel29))
                    .addContainerGap()));
    jPanel10Layout.setVerticalGroup(jPanel10Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup().addContainerGap().addComponent(jLabel24)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel25)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel26)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel27)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel28)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel29)
                    .addContainerGap()));

    jPanel12.setBorder(BorderFactory.createEtchedBorder());

    txtProxyPort.setEnabled(false);

    org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyPort}"), txtProxyPort,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    rbGroupUseProxy.add(rbUseProxy);
    rbUseProxy.setText("Use Proxy");
    rbUseProxy.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rbUseProxyActionPerformed(evt);
        }
    });

    jLabel2.setText("Proxy Port");

    rbGroupUseProxy.add(rbNoProxy);
    rbNoProxy.setText("No Proxy");
    rbNoProxy.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rbNoProxyActionPerformed(evt);
        }
    });

    txtProxyPassword.setEnabled(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyPassword}"), txtProxyPassword,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel3.setText("Username ");

    txtProxyUsername.setEnabled(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyUsername}"), txtProxyUsername,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    btnSaveProxyConfig.setIcon(new ImageIcon(getClass().getResource("/icons/edit.png"))); // NOI18N
    btnSaveProxyConfig.setText("Save");
    btnSaveProxyConfig.setHorizontalTextPosition(SwingConstants.CENTER);
    btnSaveProxyConfig.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnSaveProxyConfig.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveProxyConfigActionPerformed(evt);
        }
    });

    jLabel1.setText("Proxy Host");

    jLabel4.setText("Password");

    txtProxyHost.setEnabled(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyHost}"), txtProxyHost,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    checkProxyNeedAuth.setText("Proxy Need Authentication");

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${bUseProxyAuth}"), checkProxyNeedAuth,
            org.jdesktop.beansbinding.BeanProperty.create("selected"));
    bindingGroup.addBinding(binding);

    checkProxyNeedAuth.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkProxyNeedAuthActionPerformed(evt);
        }
    });

    GroupLayout jPanel12Layout = new GroupLayout(jPanel12);
    jPanel12.setLayout(jPanel12Layout);
    jPanel12Layout.setHorizontalGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup().addContainerGap().addGroup(jPanel12Layout
                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel12Layout.createSequentialGroup().addComponent(rbNoProxy)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(rbUseProxy))
                    .addGroup(jPanel12Layout.createSequentialGroup().addGroup(jPanel12Layout
                            .createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3).addComponent(jLabel4))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                    .addComponent(txtProxyPort, GroupLayout.PREFERRED_SIZE, 105,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtProxyHost, GroupLayout.PREFERRED_SIZE, 297,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addGroup(jPanel12Layout
                                            .createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                                            .addComponent(txtProxyPassword, GroupLayout.Alignment.LEADING)
                                            .addComponent(txtProxyUsername, GroupLayout.Alignment.LEADING,
                                                    GroupLayout.PREFERRED_SIZE, 227,
                                                    GroupLayout.PREFERRED_SIZE))))
                    .addComponent(checkProxyNeedAuth).addComponent(btnSaveProxyConfig,
                            GroupLayout.PREFERRED_SIZE, 89, GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));
    jPanel12Layout.setVerticalGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(rbNoProxy).addComponent(rbUseProxy))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1).addComponent(txtProxyHost, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2).addComponent(txtProxyPort, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addGap(4, 4, 4).addComponent(checkProxyNeedAuth)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(txtProxyUsername, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(txtProxyPassword, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(btnSaveProxyConfig)
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    GroupLayout jPanel1Layout = new GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout
            .setHorizontalGroup(
                    jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                                    .addComponent(jPanel12, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel10, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap(286, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGap(11, 11, 11)
                    .addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel12, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(165, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Proxy Connection", jPanel1);

    jPanel2.setBorder(BorderFactory.createEtchedBorder());

    jPanel11.setBackground(Color.white);
    jPanel11.setBorder(BorderFactory.createEtchedBorder());

    jLabel35.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel35.setText("the application is trigger to open a folder.");

    jLabel30.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel30.setText("Info :");

    jLabel33.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel33.setText("application downloading stuff from the internet.");

    jLabel32.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel32.setText("Default Download Path  is the default folder location when the ");

    jLabel31.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel31.setText("This is the set of configuration will be used by this application.");

    jLabel34.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel34.setText("Default Folder Viewer is the default of computer programs when ");

    GroupLayout jPanel11Layout = new GroupLayout(jPanel11);
    jPanel11.setLayout(jPanel11Layout);
    jPanel11Layout.setHorizontalGroup(jPanel11Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel11Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel30).addComponent(jLabel31).addComponent(jLabel32)
                            .addComponent(jLabel33).addComponent(jLabel34).addComponent(jLabel35))
                    .addContainerGap()));
    jPanel11Layout.setVerticalGroup(jPanel11Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup().addContainerGap().addComponent(jLabel30)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel31)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel32)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel33)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel34)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel35)
                    .addContainerGap()));

    jPanel14.setBorder(BorderFactory.createEtchedBorder());

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${defaultFolderViewer}"), txtDefaultFolderPath1,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel6.setText("Default Download Path");

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${defaultDownloadPath}"), txtDefaultFolderPath,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel7.setText("Default Folder Viewer");

    btnChooseFolder.setText("Change");
    btnChooseFolder.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnChooseFolderActionPerformed(evt);
        }
    });

    btnSaveAppConfig.setIcon(new ImageIcon(getClass().getResource("/icons/edit.png"))); // NOI18N
    btnSaveAppConfig.setText("Save");
    btnSaveAppConfig.setHorizontalTextPosition(SwingConstants.CENTER);
    btnSaveAppConfig.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnSaveAppConfig.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveAppConfigActionPerformed(evt);
        }
    });

    GroupLayout jPanel14Layout = new GroupLayout(jPanel14);
    jPanel14.setLayout(jPanel14Layout);
    jPanel14Layout.setHorizontalGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup().addContainerGap().addGroup(jPanel14Layout
                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                            .addComponent(jLabel7, GroupLayout.PREFERRED_SIZE, 161, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(txtDefaultFolderPath1, GroupLayout.PREFERRED_SIZE, 258,
                                    GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                            .addComponent(jLabel6, GroupLayout.PREFERRED_SIZE, 161, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(txtDefaultFolderPath, GroupLayout.PREFERRED_SIZE, 346,
                                    GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(btnChooseFolder))
                    .addComponent(btnSaveAppConfig, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));
    jPanel14Layout.setVerticalGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(txtDefaultFolderPath, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnChooseFolder))
                    .addGap(4, 4, 4)
                    .addGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7).addComponent(txtDefaultFolderPath1,
                                    GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addComponent(btnSaveAppConfig).addContainerGap()));

    GroupLayout jPanel2Layout = new GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout
            .setHorizontalGroup(
                    jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                                    .addComponent(jPanel14, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel11, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel11, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel14, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addContainerGap(285, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Application Config", jPanel2);

    jPanel9.setBackground(Color.white);
    jPanel9.setBorder(BorderFactory.createEtchedBorder());

    jLabel18.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel18.setText("Info :");

    jLabel23.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel23.setText("make the application processing faster.");

    jLabel19.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel19.setText("Cache Info contains a summary of how much space in hard drive");

    jLabel21.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel21.setText("hard drive space by this application, but if the application need to");

    jLabel20.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel20.setText("used by this application. Deleting cache will reduce the usage of");

    jLabel22.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel22.setText("fetch the data from internet, this cache will be used in order to");

    GroupLayout jPanel9Layout = new GroupLayout(jPanel9);
    jPanel9.setLayout(jPanel9Layout);
    jPanel9Layout.setHorizontalGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel18).addComponent(jLabel19).addComponent(jLabel20)
                            .addComponent(jLabel21).addComponent(jLabel22).addComponent(jLabel23))
                    .addContainerGap()));
    jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap().addComponent(jLabel18)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel19)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel20)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel21)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel22)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel23)
                    .addContainerGap()));

    jPanel13.setBorder(BorderFactory.createEtchedBorder());

    jLabel8.setText("Total Cache File Size");

    btnOpenOtherCacheFolder.setIcon(new ImageIcon(getClass().getResource("/icons/folder_open.png"))); // NOI18N
    btnOpenOtherCacheFolder.setText("Open Dir");
    btnOpenOtherCacheFolder.setHorizontalTextPosition(SwingConstants.CENTER);
    btnOpenOtherCacheFolder.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnOpenOtherCacheFolder.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnOpenOtherCacheFolderActionPerformed(evt);
        }
    });

    btnDeleteCache.setIcon(new ImageIcon(getClass().getResource("/icons/cross2.png"))); // NOI18N
    btnDeleteCache.setText("Delete Cache");
    btnDeleteCache.setHorizontalTextPosition(SwingConstants.CENTER);
    btnDeleteCache.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnDeleteCache.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDeleteCacheActionPerformed(evt);
        }
    });

    jLabel9.setText("Total Cache File");

    txtTotalFileSize1.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${cacheFile.fileListSize}"), txtTotalFileSize1,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    txtTotalFileSize.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${cacheFile.totalFolderSize}"), txtTotalFileSize,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    GroupLayout jPanel13Layout = new GroupLayout(jPanel13);
    jPanel13.setLayout(jPanel13Layout);
    jPanel13Layout.setHorizontalGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel8).addComponent(jLabel9).addComponent(btnDeleteCache))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                            .addComponent(txtTotalFileSize1, GroupLayout.Alignment.LEADING)
                            .addComponent(btnOpenOtherCacheFolder, GroupLayout.Alignment.LEADING,
                                    GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE)
                            .addComponent(txtTotalFileSize))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel13Layout.setVerticalGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel8).addComponent(txtTotalFileSize, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9).addComponent(txtTotalFileSize1, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(btnDeleteCache, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(btnOpenOtherCacheFolder))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    GroupLayout jPanel7Layout = new GroupLayout(jPanel7);
    jPanel7.setLayout(jPanel7Layout);
    jPanel7Layout.setHorizontalGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel13, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel9,
                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(443, Short.MAX_VALUE)));
    jPanel7Layout.setVerticalGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel9, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel13, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addContainerGap(289, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Cache Info", jPanel7);

    jPanel5.setBorder(BorderFactory.createEtchedBorder());

    txtTotalLogSize.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${logFile.totalFolderSize}"), txtTotalLogSize,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel11.setText("Total File on Log Folder");

    txtTotalLog.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${logFile.fileListSize}"), txtTotalLog,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    btnCleanLog.setIcon(new ImageIcon(getClass().getResource("/icons/cross2.png"))); // NOI18N
    btnCleanLog.setText("Clean Log File");
    btnCleanLog.setHorizontalTextPosition(SwingConstants.CENTER);
    btnCleanLog.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnCleanLog.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCleanLogActionPerformed(evt);
        }
    });

    jLabel13.setText("Total Size on Log Folder ");

    GroupLayout jPanel5Layout = new GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout.setHorizontalGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                            .addComponent(btnCleanLog, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel13).addComponent(jLabel11))
                                    .addGap(18, 18, 18)
                                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                            .addComponent(txtTotalLog, GroupLayout.PREFERRED_SIZE, 66,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(txtTotalLogSize, GroupLayout.PREFERRED_SIZE, 123,
                                                    GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap(22, Short.MAX_VALUE)));
    jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(txtTotalLog, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel11))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel13).addComponent(txtTotalLogSize, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(btnCleanLog, GroupLayout.PREFERRED_SIZE, 50, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    jPanel6.setBorder(BorderFactory.createEtchedBorder());

    jLabel12.setText("Log File Data :");

    txtLogContent.setEditable(false);
    txtLogContent.setColumns(20);
    txtLogContent.setLineWrap(true);
    txtLogContent.setRows(5);
    txtLogContent.setWrapStyleWord(true);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${logFileData}"), txtLogContent,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jScrollPane1.setViewportView(txtLogContent);

    GroupLayout jPanel6Layout = new GroupLayout(jPanel6);
    jPanel6.setLayout(jPanel6Layout);
    jPanel6Layout.setHorizontalGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 724, Short.MAX_VALUE)
                            .addGroup(jPanel6Layout.createSequentialGroup().addComponent(jLabel12).addGap(0, 0,
                                    Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel6Layout
            .setVerticalGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap().addComponent(jLabel12)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jScrollPane1,
                                    GroupLayout.PREFERRED_SIZE, 339, GroupLayout.PREFERRED_SIZE)
                            .addContainerGap()));

    jPanel8.setBackground(Color.white);
    jPanel8.setBorder(BorderFactory.createEtchedBorder());

    jLabel17.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel17.setText("application use it as a log tracker.");

    jLabel16.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel16.setText("These 2 log files cannot be delete, because the");

    jLabel15.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel15.setText("Minimal log files is 2 files.");

    jLabel14.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel14.setText("Info :");

    GroupLayout jPanel8Layout = new GroupLayout(jPanel8);
    jPanel8.setLayout(jPanel8Layout);
    jPanel8Layout.setHorizontalGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel14).addComponent(jLabel15).addComponent(jLabel16)
                            .addComponent(jLabel17))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel8Layout.setVerticalGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup().addContainerGap().addComponent(jLabel14)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel15)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel16)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel17)
                    .addContainerGap()));

    GroupLayout jPanel3Layout = new GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(
            GroupLayout.Alignment.TRAILING,
            jPanel3Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel5, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel8, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jPanel6, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addGap(20, 20, 20)
                    .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                    .addComponent(jPanel5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel8, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(41, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Log Monitor", jPanel3);

    jPanel15.setBorder(BorderFactory.createEtchedBorder());

    txtAppLookAndFeel.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${defaultLookAndFeel}"), txtAppLookAndFeel,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel10.setText("Look And Feel ");

    btnSaveLF.setIcon(new ImageIcon(getClass().getResource("/icons/edit.png"))); // NOI18N
    btnSaveLF.setText("Save");
    btnSaveLF.setHorizontalTextPosition(SwingConstants.CENTER);
    btnSaveLF.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnSaveLF.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveLFActionPerformed(evt);
        }
    });

    btnSelectLF.setText("Change Look and Feel");
    btnSelectLF.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSelectLFActionPerformed(evt);
        }
    });

    GroupLayout jPanel15Layout = new GroupLayout(jPanel15);
    jPanel15.setLayout(jPanel15Layout);
    jPanel15Layout.setHorizontalGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup().addContainerGap().addComponent(jLabel10)
                    .addGap(4, 4, 4)
                    .addGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(btnSaveLF, GroupLayout.PREFERRED_SIZE, 90, GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtAppLookAndFeel, GroupLayout.PREFERRED_SIZE, 395,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnSelectLF, GroupLayout.PREFERRED_SIZE, 176,
                                    GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel15Layout.setVerticalGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel10).addComponent(txtAppLookAndFeel, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(btnSelectLF)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(btnSaveLF)
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jPanel16.setBackground(Color.white);
    jPanel16.setBorder(BorderFactory.createEtchedBorder());

    jLabel41.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel41.setText("to be restarted.");

    jLabel36.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel36.setText("Info :");

    jLabel40.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel40.setText("System. Changing Look and Feel requires application");

    jLabel37.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel37.setText("Changing the Look and Feel means changing this");

    jLabel38.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel38.setText("application theme, the theme provided by it's installed");

    jLabel39.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel39.setText("Look and Feel class in the Java Runtime Environment");

    GroupLayout jPanel16Layout = new GroupLayout(jPanel16);
    jPanel16.setLayout(jPanel16Layout);
    jPanel16Layout.setHorizontalGroup(jPanel16Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel16Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel36).addComponent(jLabel37).addComponent(jLabel38)
                            .addComponent(jLabel39).addComponent(jLabel40).addComponent(jLabel41))
                    .addContainerGap()));
    jPanel16Layout.setVerticalGroup(jPanel16Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup().addContainerGap().addComponent(jLabel36)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel37)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel38)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel39)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel40)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel41)
                    .addContainerGap()));

    GroupLayout jPanel4Layout = new GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout
            .setHorizontalGroup(
                    jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap()
                                    .addComponent(jPanel15, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel16, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap(261, Short.MAX_VALUE)));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel16, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel15, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addContainerGap(289, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Look And Feel", jPanel4);

    jLabel5.setFont(new Font("DejaVu Sans", 1, 18)); // NOI18N
    jLabel5.setHorizontalAlignment(SwingConstants.CENTER);
    jLabel5.setText("System Configuration");

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1).addComponent(jLabel5, GroupLayout.Alignment.TRAILING,
                    GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addComponent(jLabel5)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jTabbedPane1)));

    bindingGroup.bind();
}

From source file:com.itemanalysis.jmetrik.swing.GraphOptionPanel.java

private void initComponents() {

    orientationButtonGroup = new ButtonGroup();
    colorPanel = new JPanel();
    color1Label = new JLabel();
    colorLabel2 = new JLabel();
    colorButton1 = new JButton();
    colorButton2 = new JButton();
    colorLabel3 = new JLabel();
    colorButton3 = new JButton();
    colorLabel4 = new JLabel();
    colorButton4 = new JButton();
    colorLabel5 = new JLabel();
    colorButton5 = new JButton();
    colorLabel6 = new JLabel();
    colorButton6 = new JButton();
    colorLabel7 = new JLabel();
    colorButton7 = new JButton();
    colorLabel8 = new JLabel();
    colorButton8 = new JButton();
    colorLabel9 = new JLabel();
    colorButton9 = new JButton();
    lineStylePanel = new JPanel();
    lineLabel1 = new JLabel();
    lineStyleComboBox1 = new JComboBox();
    lineLabel2 = new JLabel();
    lineStyleComboBox2 = new JComboBox();
    lineLabel3 = new JLabel();
    lineStyleComboBox3 = new JComboBox();
    lineLabel4 = new JLabel();
    lineStyleComboBox4 = new JComboBox();
    lineLabel5 = new JLabel();
    lineStyleComboBox5 = new JComboBox();
    lineLabel6 = new JLabel();
    lineStyleComboBox6 = new JComboBox();
    lineLabel7 = new JLabel();
    lineStyleComboBox7 = new JComboBox();
    lineLabel8 = new JLabel();
    lineStyleComboBox8 = new JComboBox();
    lineLabel9 = new JLabel();
    lineStyleComboBox9 = new JComboBox();
    lineWidthLabel = new JLabel();
    lineWidthTextField = new JTextField();
    displayPanel = new JPanel();
    legendPositionComboBox = new JComboBox();
    legendCheckbox = new JCheckBox();
    markersCheckbox = new JCheckBox();
    horizontalRadioButton = new JRadioButton();
    verticalRadioButton = new JRadioButton();
    sizePanel = new JPanel();
    widthLabel = new JLabel();
    widthTextField = new JTextField();
    heightLabel = new JLabel();
    heightTextField = new JTextField();
    resetButton = new JButton();

    //        setBorder(BorderFactory.createTitledBorder(""));

    colorPanel.setBorder(BorderFactory.createTitledBorder("Color Sequence"));

    color1Label.setText("Color 1");

    colorLabel2.setText("Color 2");

    colorButton1.setText("Choose Color");
    colorButton1.setMaximumSize(new Dimension(116, 25));
    colorButton1.setMinimumSize(new Dimension(116, 25));
    colorButton1.setPreferredSize(new Dimension(116, 25));
    colorButton1.setBackground(color[0]);
    colorButton1.addActionListener(new ActionListener() {
        @Override/*  w  ww . j  a v a  2 s .  c om*/
        public void actionPerformed(ActionEvent e) {
            Color newColor = JColorChooser.showDialog(GraphOptionPanel.this, "Color 1", color[0]);
            if (newColor != null) {
                colorButton1.setBackground(newColor);
                color[0] = newColor;
            }
        }
    });

    colorButton2.setText("Choose Color");
    colorButton2.setMaximumSize(new Dimension(116, 25));
    colorButton2.setMinimumSize(new Dimension(116, 25));
    colorButton2.setPreferredSize(new Dimension(116, 25));
    colorButton2.setBackground(color[1]);
    colorButton2.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            Color newColor = JColorChooser.showDialog(GraphOptionPanel.this, "Color 2", color[1]);
            if (newColor != null) {
                colorButton2.setBackground(newColor);
                color[1] = newColor;
            }
        }
    });

    colorLabel3.setText("Color 3");

    colorButton3.setText("Choose Color");
    colorButton3.setMaximumSize(new Dimension(116, 25));
    colorButton3.setMinimumSize(new Dimension(116, 25));
    colorButton3.setPreferredSize(new Dimension(116, 25));
    colorButton3.setBackground(color[2]);
    colorButton3.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            Color newColor = JColorChooser.showDialog(GraphOptionPanel.this, "Color 3", color[2]);
            if (newColor != null) {
                colorButton3.setBackground(newColor);
                color[2] = newColor;
            }
        }
    });

    colorLabel4.setText("Color 4");

    colorButton4.setText("Choose Color");
    colorButton4.setMaximumSize(new Dimension(116, 25));
    colorButton4.setMinimumSize(new Dimension(116, 25));
    colorButton4.setPreferredSize(new Dimension(116, 25));
    colorButton4.setBackground(color[3]);
    colorButton4.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            Color newColor = JColorChooser.showDialog(GraphOptionPanel.this, "Color 4", color[3]);
            if (newColor != null) {
                colorButton4.setBackground(newColor);
                color[3] = newColor;
            }
        }
    });

    colorLabel5.setText("Color 5");

    colorButton5.setText("Choose Color");
    colorButton5.setMaximumSize(new Dimension(116, 25));
    colorButton5.setMinimumSize(new Dimension(116, 25));
    colorButton5.setPreferredSize(new Dimension(116, 25));
    colorButton5.setBackground(color[4]);
    colorButton5.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            Color newColor = JColorChooser.showDialog(GraphOptionPanel.this, "Color 5", color[4]);
            if (newColor != null) {
                colorButton5.setBackground(newColor);
                color[4] = newColor;
            }
        }
    });

    colorLabel6.setText("Color 6");

    colorButton6.setText("Choose Color");
    colorButton6.setMaximumSize(new Dimension(116, 25));
    colorButton6.setMinimumSize(new Dimension(116, 25));
    colorButton6.setPreferredSize(new Dimension(116, 25));
    colorButton6.setBackground(color[5]);
    colorButton6.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            Color newColor = JColorChooser.showDialog(GraphOptionPanel.this, "Color 6", color[5]);
            if (newColor != null) {
                colorButton6.setBackground(newColor);
                color[5] = newColor;
            }
        }
    });

    colorLabel7.setText("Color 7");

    colorButton7.setText("Choose Color");
    colorButton7.setMaximumSize(new Dimension(116, 25));
    colorButton7.setMinimumSize(new Dimension(116, 25));
    colorButton7.setPreferredSize(new Dimension(116, 25));
    colorButton7.setBackground(color[6]);
    colorButton7.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            Color newColor = JColorChooser.showDialog(GraphOptionPanel.this, "Color 7", color[6]);
            if (newColor != null) {
                colorButton7.setBackground(newColor);
                color[6] = newColor;
            }
        }
    });

    colorLabel8.setText("Color 8");

    colorButton8.setText("Choose Color");
    colorButton8.setMaximumSize(new Dimension(116, 25));
    colorButton8.setMinimumSize(new Dimension(116, 25));
    colorButton8.setPreferredSize(new Dimension(116, 25));
    colorButton8.setBackground(color[7]);
    colorButton8.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            Color newColor = JColorChooser.showDialog(GraphOptionPanel.this, "Color 8", color[7]);
            if (newColor != null) {
                colorButton8.setBackground(newColor);
                color[7] = newColor;
            }
        }
    });

    colorLabel9.setText("Color 9");

    colorButton9.setText("Choose Color");
    colorButton9.setMaximumSize(new Dimension(116, 25));
    colorButton9.setMinimumSize(new Dimension(116, 25));
    colorButton9.setPreferredSize(new Dimension(116, 25));
    colorButton9.setBackground(color[8]);
    colorButton9.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            Color newColor = JColorChooser.showDialog(GraphOptionPanel.this, "Color 9", color[8]);
            if (newColor != null) {
                colorButton9.setBackground(newColor);
                color[8] = newColor;
            }
        }
    });

    GroupLayout colorPanelLayout = new GroupLayout(colorPanel);
    colorPanel.setLayout(colorPanelLayout);
    colorPanelLayout.setHorizontalGroup(colorPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(colorPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(colorPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(colorPanelLayout.createSequentialGroup().addComponent(color1Label)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(colorButton1, GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE))
                            .addGroup(colorPanelLayout.createSequentialGroup().addComponent(colorLabel2)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(colorButton2, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(colorPanelLayout.createSequentialGroup().addComponent(colorLabel3)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(colorButton3, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(colorPanelLayout.createSequentialGroup().addComponent(colorLabel4)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(colorButton4, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(colorPanelLayout.createSequentialGroup().addComponent(colorLabel5)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(colorButton5, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(colorPanelLayout.createSequentialGroup().addComponent(colorLabel6)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(colorButton6, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(colorPanelLayout.createSequentialGroup().addComponent(colorLabel7)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(colorButton7, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(colorPanelLayout.createSequentialGroup().addComponent(colorLabel8)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(colorButton8, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(colorPanelLayout.createSequentialGroup().addComponent(colorLabel9)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(colorButton9, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addContainerGap()));
    colorPanelLayout.setVerticalGroup(colorPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(colorPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(colorPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(color1Label).addComponent(colorButton1, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(colorPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(colorLabel2).addComponent(colorButton2, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(colorPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(colorLabel3).addComponent(colorButton3, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(colorPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(colorLabel4).addComponent(colorButton4, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(colorPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(colorLabel5).addComponent(colorButton5, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(colorPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(colorLabel6).addComponent(colorButton6, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(colorPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(colorLabel7).addComponent(colorButton7, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(colorPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(colorLabel8).addComponent(colorButton8, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(colorPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(colorLabel9).addComponent(colorButton9, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    lineStylePanel.setBorder(BorderFactory.createTitledBorder("Line Styles"));

    lineLabel1.setText("Line 1");

    lineStyleComboBox1.setModel(new DefaultComboBoxModel(ChartStyle.LINE_STYLE_NAME));
    lineStyleComboBox1.setRenderer(new LineStyleComboBoxRenderer());
    lineStyleComboBox1.setSelectedItem(ChartStyle.floatStyleToString(selectedLineStyles[0]));
    lineStyleComboBox1.setMinimumSize(new Dimension(150, 25));
    lineStyleComboBox1.setPreferredSize(new Dimension(150, 25));

    lineLabel2.setText("Line 2");

    lineStyleComboBox2.setModel(new DefaultComboBoxModel(ChartStyle.LINE_STYLE_NAME));
    lineStyleComboBox2.setRenderer(new LineStyleComboBoxRenderer());
    lineStyleComboBox2.setSelectedItem(ChartStyle.floatStyleToString(selectedLineStyles[1]));
    lineStyleComboBox2.setMinimumSize(new Dimension(150, 25));
    lineStyleComboBox2.setPreferredSize(new Dimension(150, 25));

    lineLabel3.setText("Line 3");

    lineStyleComboBox3.setModel(new DefaultComboBoxModel(ChartStyle.LINE_STYLE_NAME));
    lineStyleComboBox3.setRenderer(new LineStyleComboBoxRenderer());
    lineStyleComboBox3.setSelectedItem(ChartStyle.floatStyleToString(selectedLineStyles[2]));
    lineStyleComboBox3.setMinimumSize(new Dimension(150, 25));
    lineStyleComboBox3.setPreferredSize(new Dimension(150, 25));

    lineLabel4.setText("Line 4");

    lineStyleComboBox4.setModel(new DefaultComboBoxModel(ChartStyle.LINE_STYLE_NAME));
    lineStyleComboBox4.setRenderer(new LineStyleComboBoxRenderer());
    lineStyleComboBox4.setSelectedItem(ChartStyle.floatStyleToString(selectedLineStyles[3]));
    lineStyleComboBox4.setMinimumSize(new Dimension(150, 25));
    lineStyleComboBox4.setPreferredSize(new Dimension(150, 25));

    lineLabel5.setText("Line 5");

    lineStyleComboBox5.setModel(new DefaultComboBoxModel(ChartStyle.LINE_STYLE_NAME));
    lineStyleComboBox5.setRenderer(new LineStyleComboBoxRenderer());
    lineStyleComboBox5.setSelectedItem(ChartStyle.floatStyleToString(selectedLineStyles[4]));
    lineStyleComboBox5.setMinimumSize(new Dimension(150, 25));
    lineStyleComboBox5.setPreferredSize(new Dimension(150, 25));

    lineLabel6.setText("Line 6");

    lineStyleComboBox6.setModel(new DefaultComboBoxModel(ChartStyle.LINE_STYLE_NAME));
    lineStyleComboBox6.setRenderer(new LineStyleComboBoxRenderer());
    lineStyleComboBox6.setSelectedItem(ChartStyle.floatStyleToString(selectedLineStyles[5]));
    lineStyleComboBox6.setMinimumSize(new Dimension(150, 25));
    lineStyleComboBox6.setPreferredSize(new Dimension(150, 25));

    lineLabel7.setText("Line 7");

    lineStyleComboBox7.setModel(new DefaultComboBoxModel(ChartStyle.LINE_STYLE_NAME));
    lineStyleComboBox7.setRenderer(new LineStyleComboBoxRenderer());
    lineStyleComboBox7.setSelectedItem(ChartStyle.floatStyleToString(selectedLineStyles[6]));
    lineStyleComboBox7.setMinimumSize(new Dimension(150, 25));
    lineStyleComboBox7.setPreferredSize(new Dimension(150, 25));

    lineLabel8.setText("Line 8");

    lineStyleComboBox8.setModel(new DefaultComboBoxModel(ChartStyle.LINE_STYLE_NAME));
    lineStyleComboBox8.setRenderer(new LineStyleComboBoxRenderer());
    lineStyleComboBox8.setSelectedItem(ChartStyle.floatStyleToString(selectedLineStyles[7]));
    lineStyleComboBox8.setMinimumSize(new Dimension(150, 25));
    lineStyleComboBox8.setPreferredSize(new Dimension(150, 25));

    lineLabel9.setText("Line 9");

    lineStyleComboBox9.setModel(new DefaultComboBoxModel(ChartStyle.LINE_STYLE_NAME));
    lineStyleComboBox9.setRenderer(new LineStyleComboBoxRenderer());
    lineStyleComboBox9.setSelectedItem(ChartStyle.floatStyleToString(selectedLineStyles[8]));
    lineStyleComboBox9.setMinimumSize(new Dimension(150, 25));
    lineStyleComboBox9.setPreferredSize(new Dimension(150, 25));

    GroupLayout lineStylePanelLayout = new GroupLayout(lineStylePanel);
    lineStylePanel.setLayout(lineStylePanelLayout);
    lineStylePanelLayout.setHorizontalGroup(lineStylePanelLayout
            .createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(lineStylePanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(lineStylePanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(lineStylePanelLayout.createSequentialGroup().addComponent(lineLabel1)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(lineStyleComboBox1, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                            .addGroup(lineStylePanelLayout.createSequentialGroup().addComponent(lineLabel2)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(lineStyleComboBox2, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                            .addGroup(lineStylePanelLayout.createSequentialGroup().addComponent(lineLabel3)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(lineStyleComboBox3, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                            .addGroup(lineStylePanelLayout.createSequentialGroup().addComponent(lineLabel4)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(lineStyleComboBox4, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                            .addGroup(lineStylePanelLayout.createSequentialGroup().addComponent(lineLabel5)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(lineStyleComboBox5, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                            .addGroup(lineStylePanelLayout.createSequentialGroup().addComponent(lineLabel6)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(lineStyleComboBox6, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                            .addGroup(lineStylePanelLayout.createSequentialGroup().addComponent(lineLabel7)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(lineStyleComboBox7, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                            .addGroup(lineStylePanelLayout.createSequentialGroup().addComponent(lineLabel8)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(lineStyleComboBox8, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                            .addGroup(lineStylePanelLayout.createSequentialGroup().addComponent(lineLabel9)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(lineStyleComboBox9, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    lineStylePanelLayout
            .setVerticalGroup(lineStylePanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(lineStylePanelLayout.createSequentialGroup().addContainerGap()
                            .addGroup(lineStylePanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(lineLabel1).addComponent(lineStyleComboBox1,
                                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(lineStylePanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(lineLabel2).addComponent(lineStyleComboBox2,
                                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(lineStylePanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(lineLabel3).addComponent(lineStyleComboBox3,
                                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(lineStylePanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(lineLabel4).addComponent(lineStyleComboBox4,
                                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(lineStylePanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(lineLabel5).addComponent(lineStyleComboBox5,
                                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(lineStylePanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(lineLabel6).addComponent(lineStyleComboBox6,
                                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(lineStylePanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(lineLabel7).addComponent(lineStyleComboBox7,
                                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(lineStylePanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(lineLabel8).addComponent(lineStyleComboBox8,
                                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(lineStylePanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(lineLabel9).addComponent(lineStyleComboBox9,
                                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE))
                            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    displayPanel.setBorder(BorderFactory.createTitledBorder("Display Options"));

    legendPositionComboBox
            .setModel(new DefaultComboBoxModel(new String[] { "Bottom", "Left", "Top", "Right" }));
    legendPositionComboBox.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            String s = legendPositionComboBox.getSelectedItem().toString();
            if ("Bottom".equals(s)) {
                prefs.setLegendPosition(RectangleEdge.BOTTOM);
            } else if ("Left".equals(s)) {
                prefs.setLegendPosition(RectangleEdge.LEFT);
            } else if ("Top".equals(s)) {
                prefs.setLegendPosition(RectangleEdge.TOP);
            } else {
                prefs.setLegendPosition(RectangleEdge.RIGHT);
            }

        }
    });

    legendCheckbox.setSelected(true);
    legendCheckbox.setText("Legend");
    legendCheckbox.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            if (legendCheckbox.isSelected()) {
                prefs.setShowLegend(true);
            } else {
                prefs.setShowLegend(false);
            }
        }
    });

    markersCheckbox.setText("Point markers");
    markersCheckbox.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            if (markersCheckbox.isSelected()) {
                prefs.setShowMarkers(true);
            } else {
                prefs.setShowMarkers(false);
            }
        }
    });

    orientationButtonGroup.add(horizontalRadioButton);
    horizontalRadioButton.setText("Horizontal orientation");
    horizontalRadioButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            if (horizontalRadioButton.isSelected()) {
                prefs.setChartOrientation(PlotOrientation.HORIZONTAL);
            }
        }
    });

    orientationButtonGroup.add(verticalRadioButton);
    verticalRadioButton.setSelected(true);
    verticalRadioButton.setText("Vertical orientation");
    verticalRadioButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            if (verticalRadioButton.isSelected()) {
                prefs.setChartOrientation(PlotOrientation.VERTICAL);
            }
        }
    });

    GroupLayout displayPanelLayout = new GroupLayout(displayPanel);
    displayPanel.setLayout(displayPanelLayout);
    displayPanelLayout.setHorizontalGroup(displayPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(displayPanelLayout.createSequentialGroup().addContainerGap().addGroup(displayPanelLayout
                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(displayPanelLayout.createSequentialGroup().addGroup(displayPanelLayout
                            .createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(markersCheckbox)
                            .addGroup(displayPanelLayout.createSequentialGroup().addComponent(legendCheckbox)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(legendPositionComboBox, 0, 89, Short.MAX_VALUE)))
                            .addGap(26, 26, 26))
                    .addGroup(displayPanelLayout.createSequentialGroup().addComponent(horizontalRadioButton)
                            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(displayPanelLayout.createSequentialGroup().addComponent(verticalRadioButton)
                            .addGap(0, 0, Short.MAX_VALUE)))));
    displayPanelLayout.setVerticalGroup(displayPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(displayPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(displayPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(legendCheckbox).addComponent(legendPositionComboBox,
                                    GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(markersCheckbox)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(horizontalRadioButton)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(verticalRadioButton)
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    sizePanel.setBorder(BorderFactory.createTitledBorder("Chart Size"));

    widthLabel.setText("Width");

    widthTextField.setText("450");
    widthTextField.setMaximumSize(new Dimension(100, 25));
    widthTextField.setMinimumSize(new Dimension(100, 25));
    widthTextField.setPreferredSize(new Dimension(100, 25));
    widthTextField.addFocusListener(new FocusListener() {
        @Override
        public void focusGained(FocusEvent e) {
            //do nothing
        }

        @Override
        public void focusLost(FocusEvent e) {
            String s = widthTextField.getText();
            try {
                int w = Integer.parseInt(s);
                prefs.setChartWidth(w);
            } catch (NumberFormatException ex) {
                widthTextField.setText("450");
            }
        }
    });

    heightLabel.setText("Height");

    heightTextField.setText("400");
    heightTextField.setMaximumSize(new Dimension(100, 25));
    heightTextField.setMinimumSize(new Dimension(100, 25));
    heightTextField.setPreferredSize(new Dimension(100, 25));
    heightTextField.addFocusListener(new FocusListener() {
        @Override
        public void focusGained(FocusEvent e) {
            //do nothing
        }

        @Override
        public void focusLost(FocusEvent e) {
            try {
                String s = heightTextField.getText();
                int h = Integer.parseInt(s);
                prefs.setChartHeight(h);
            } catch (NumberFormatException ex) {
                heightTextField.setText("400");
            }
        }
    });

    lineWidthLabel.setText("Line width");

    lineWidthTextField.setText("1.0");
    lineWidthTextField.setMaximumSize(new Dimension(100, 25));
    lineWidthTextField.setMinimumSize(new Dimension(100, 25));
    lineWidthTextField.setPreferredSize(new Dimension(100, 25));
    lineWidthTextField.addFocusListener(new FocusListener() {
        @Override
        public void focusGained(FocusEvent e) {
            //do nothing
        }

        @Override
        public void focusLost(FocusEvent e) {
            try {

                String s = lineWidthTextField.getText();
                float lw = Float.parseFloat(s);
                prefs.setChartLineWidth(lw);
            } catch (NumberFormatException ex) {
                lineWidthTextField.setText("1.0");
            }
        }
    });

    GroupLayout sizePanelLayout = new GroupLayout(sizePanel);
    sizePanel.setLayout(sizePanelLayout);
    sizePanelLayout.setHorizontalGroup(sizePanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(sizePanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(sizePanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(widthLabel).addComponent(heightLabel).addComponent(lineWidthLabel))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(sizePanelLayout.createParallelGroup(GroupLayout.Alignment.CENTER)
                            .addComponent(widthTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(heightTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(lineWidthTextField, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    sizePanelLayout.setVerticalGroup(sizePanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(sizePanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(sizePanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(widthLabel).addComponent(widthTextField, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(sizePanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(heightLabel).addComponent(heightTextField, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(sizePanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(lineWidthLabel).addComponent(lineWidthTextField,
                                    GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    resetButton.setText("Reset to Default Chart Options");
    resetButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            resetPanel();
        }
    });

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
                    .createSequentialGroup()
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                            .addComponent(displayPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(colorPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(lineStylePanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(sizePanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)))
                    .addComponent(resetButton))
            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(colorPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(lineStylePanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(sizePanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(displayPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(resetButton)
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
}

From source file:ir.ac.iust.nlp.postagger.POSTaggerForm.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.// ww w  .  j a va2s .  c  om
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    rbgPOSTypeD2T = new javax.swing.ButtonGroup();
    rbgPOSTypeT2D = new javax.swing.ButtonGroup();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    pnlConverter = new javax.swing.JPanel();
    tabConverter = new javax.swing.JTabbedPane();
    pnlDep2Tag = new javax.swing.JPanel();
    lblInputCoNLLFile = new javax.swing.JLabel();
    txtInputCoNLLFile = new javax.swing.JTextField();
    btnBrowseInputCoNLLFile = new javax.swing.JButton();
    lblOutputTagPath = new javax.swing.JLabel();
    txtOutputTagPath = new javax.swing.JTextField();
    btnBrowseOutputTagPath = new javax.swing.JButton();
    btnConertDep2Tag = new javax.swing.JButton();
    chkAddGoldTag = new javax.swing.JCheckBox();
    pnlPOSTypeD2T = new javax.swing.JPanel();
    rbFPOSD2T = new javax.swing.JRadioButton();
    rbCPOSD2T = new javax.swing.JRadioButton();
    pnlTag2Dep = new javax.swing.JPanel();
    lblInputTagFile = new javax.swing.JLabel();
    txtInputTagFile = new javax.swing.JTextField();
    btnBrowseInputTagFile = new javax.swing.JButton();
    lblOutputDepPath = new javax.swing.JLabel();
    txtOutputDepPath = new javax.swing.JTextField();
    btnBrowseOutputDepPath = new javax.swing.JButton();
    btnConvertTag2Dep = new javax.swing.JButton();
    pnlPOSTypeT2D = new javax.swing.JPanel();
    rbFPOST2D = new javax.swing.JRadioButton();
    rbCPOST2D = new javax.swing.JRadioButton();
    lblInputCoNLLFileT2D = new javax.swing.JLabel();
    txtInputCoNLLFileT2D = new javax.swing.JTextField();
    btnBrowseInputCoNLLFileT2D = new javax.swing.JButton();
    pnlTrain = new javax.swing.JPanel();
    lblTrainFile = new javax.swing.JLabel();
    txtTrainFile = new javax.swing.JTextField();
    btnBrowseTrainFile = new javax.swing.JButton();
    lblTrainModelPath = new javax.swing.JLabel();
    txtTrainModelPath = new javax.swing.JTextField();
    btnBrowseTrainModelPath = new javax.swing.JButton();
    lblMaxIters = new javax.swing.JLabel();
    spMaxIters = new javax.swing.JSpinner();
    btnStartTraining = new javax.swing.JButton();
    jScrollbar2 = new javax.swing.JScrollPane();
    txtTrainLog = new javax.swing.JTextArea();
    pnlTag = new javax.swing.JPanel();
    lblInputFile = new javax.swing.JLabel();
    txtInputFile = new javax.swing.JTextField();
    btnBrowseInputFile = new javax.swing.JButton();
    lblOutputPath = new javax.swing.JLabel();
    txtOutputPath = new javax.swing.JTextField();
    btnBrowseOutputPath = new javax.swing.JButton();
    chkGoldFile = new javax.swing.JCheckBox();
    txtGoldFile = new javax.swing.JTextField();
    btnBrowseGoldFile = new javax.swing.JButton();
    tabTag = new javax.swing.JTabbedPane();
    pnlTagLog = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    txtTagLog = new javax.swing.JTextArea();
    pnlTagResults = new javax.swing.JPanel();
    lblTagEvaluation = new javax.swing.JLabel();
    jScrollPane2 = new javax.swing.JScrollPane();
    lstWordsList = new javax.swing.JList(new DefaultListModel());
    lblWordsList = new javax.swing.JLabel();
    jScrollPane3 = new javax.swing.JScrollPane();
    lstPredictedTags = new javax.swing.JList(new DefaultListModel());
    jScrollPane4 = new javax.swing.JScrollPane();
    lstGoldTags = new javax.swing.JList(new DefaultListModel());
    lblPredictedTags = new javax.swing.JLabel();
    lblGoldTags = new javax.swing.JLabel();
    btnStartTagging = new javax.swing.JButton();
    lblModelPath = new javax.swing.JLabel();
    txtModelPath = new javax.swing.JTextField();
    btnBrowseModelPath = new javax.swing.JButton();
    pnlAbout = new javax.swing.JPanel();
    lblMXPostTitle = new javax.swing.JLabel();
    lblMXPostSiteTitle = new javax.swing.JLabel();
    lblMXPostSiteValue = new javax.swing.JTextField();
    lblMXPostAuthorsTitle = new javax.swing.JLabel();
    lblMXPostAuthorsValue = new javax.swing.JTextField();
    lblMXPostCitationTitle = new javax.swing.JLabel();
    jScrollPane9 = new javax.swing.JScrollPane();
    txtMXPostCitationValue = new javax.swing.JTextArea();
    lblMXpostLicenseTitle = new javax.swing.JLabel();
    jScrollPane5 = new javax.swing.JScrollPane();
    txtMXPostLicenseValue = new javax.swing.JTextArea();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("POS Tagger");

    lblInputCoNLLFile.setText("Input CoNLL File:");

    txtInputCoNLLFile.setEditable(false);

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

    lblOutputTagPath.setText("Output Path:");

    txtOutputTagPath.setEditable(false);

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

    btnConertDep2Tag.setText("Start Convert");
    btnConertDep2Tag.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnConertDep2TagActionPerformed(evt);
        }
    });

    chkAddGoldTag.setSelected(true);
    chkAddGoldTag.setText("Add Gold Tag");

    pnlPOSTypeD2T.setBorder(javax.swing.BorderFactory.createTitledBorder("Type"));

    rbgPOSTypeD2T.add(rbFPOSD2T);
    rbFPOSD2T.setSelected(true);
    rbFPOSD2T.setText("Fine-grained POS");

    rbgPOSTypeD2T.add(rbCPOSD2T);
    rbCPOSD2T.setText("Coarse-grained POS");

    javax.swing.GroupLayout pnlPOSTypeD2TLayout = new javax.swing.GroupLayout(pnlPOSTypeD2T);
    pnlPOSTypeD2T.setLayout(pnlPOSTypeD2TLayout);
    pnlPOSTypeD2TLayout.setHorizontalGroup(pnlPOSTypeD2TLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlPOSTypeD2TLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pnlPOSTypeD2TLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rbFPOSD2T).addComponent(rbCPOSD2T))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    pnlPOSTypeD2TLayout
            .setVerticalGroup(pnlPOSTypeD2TLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlPOSTypeD2TLayout.createSequentialGroup().addComponent(rbFPOSD2T)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(rbCPOSD2T)));

    javax.swing.GroupLayout pnlDep2TagLayout = new javax.swing.GroupLayout(pnlDep2Tag);
    pnlDep2Tag.setLayout(pnlDep2TagLayout);
    pnlDep2TagLayout.setHorizontalGroup(pnlDep2TagLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDep2TagLayout.createSequentialGroup().addContainerGap().addGroup(pnlDep2TagLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlDep2TagLayout.createSequentialGroup()
                            .addGroup(pnlDep2TagLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblInputCoNLLFile).addComponent(lblOutputTagPath))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(pnlDep2TagLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtInputCoNLLFile).addComponent(txtOutputTagPath))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(pnlDep2TagLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(btnBrowseOutputTagPath,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
                                    .addComponent(btnBrowseInputCoNLLFile,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 27,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlDep2TagLayout.createSequentialGroup()
                            .addGroup(pnlDep2TagLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(chkAddGoldTag).addComponent(pnlPOSTypeD2T,
                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 398,
                                    Short.MAX_VALUE)
                            .addComponent(btnConertDep2Tag)))
                    .addContainerGap()));
    pnlDep2TagLayout.setVerticalGroup(pnlDep2TagLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDep2TagLayout.createSequentialGroup().addContainerGap().addGroup(pnlDep2TagLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblInputCoNLLFile)
                    .addComponent(txtInputCoNLLFile, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBrowseInputCoNLLFile))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlDep2TagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblOutputTagPath)
                            .addComponent(txtOutputTagPath, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnBrowseOutputTagPath))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlDep2TagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlDep2TagLayout.createSequentialGroup().addComponent(chkAddGoldTag)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(pnlPOSTypeD2T, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(btnConertDep2Tag))
                    .addContainerGap(146, Short.MAX_VALUE)));

    tabConverter.addTab("Dependency to Tagger", pnlDep2Tag);

    lblInputTagFile.setText("Input Tag File:");

    txtInputTagFile.setEditable(false);

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

    lblOutputDepPath.setText("Output Path:");

    txtOutputDepPath.setEditable(false);

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

    btnConvertTag2Dep.setText("Start Convert");
    btnConvertTag2Dep.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnConvertTag2DepActionPerformed(evt);
        }
    });

    pnlPOSTypeT2D.setBorder(javax.swing.BorderFactory.createTitledBorder("Type"));

    rbgPOSTypeT2D.add(rbFPOST2D);
    rbFPOST2D.setSelected(true);
    rbFPOST2D.setText("Fine-grained POS");

    rbgPOSTypeT2D.add(rbCPOST2D);
    rbCPOST2D.setText("Coarse-grained POS");

    javax.swing.GroupLayout pnlPOSTypeT2DLayout = new javax.swing.GroupLayout(pnlPOSTypeT2D);
    pnlPOSTypeT2D.setLayout(pnlPOSTypeT2DLayout);
    pnlPOSTypeT2DLayout.setHorizontalGroup(pnlPOSTypeT2DLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlPOSTypeT2DLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pnlPOSTypeT2DLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rbFPOST2D).addComponent(rbCPOST2D))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    pnlPOSTypeT2DLayout
            .setVerticalGroup(pnlPOSTypeT2DLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlPOSTypeT2DLayout.createSequentialGroup().addComponent(rbFPOST2D)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(rbCPOST2D)));

    lblInputCoNLLFileT2D.setText("Input CoNLL File:");

    txtInputCoNLLFileT2D.setEditable(false);

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

    javax.swing.GroupLayout pnlTag2DepLayout = new javax.swing.GroupLayout(pnlTag2Dep);
    pnlTag2Dep.setLayout(pnlTag2DepLayout);
    pnlTag2DepLayout.setHorizontalGroup(pnlTag2DepLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTag2DepLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pnlTag2DepLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlTag2DepLayout.createSequentialGroup()
                                    .addComponent(pnlPOSTypeT2D, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 398,
                                            Short.MAX_VALUE)
                                    .addComponent(btnConvertTag2Dep))
                            .addGroup(pnlTag2DepLayout.createSequentialGroup()
                                    .addGroup(pnlTag2DepLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lblInputTagFile).addComponent(lblOutputDepPath)
                                            .addComponent(lblInputCoNLLFileT2D))
                                    .addGap(14, 14, 14)
                                    .addGroup(pnlTag2DepLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(txtInputTagFile).addComponent(txtInputCoNLLFileT2D)
                                            .addComponent(txtOutputDepPath))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(pnlTag2DepLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                    false)
                                            .addComponent(btnBrowseInputCoNLLFileT2D,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
                                            .addComponent(btnBrowseOutputDepPath,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                                            .addComponent(btnBrowseInputTagFile,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 31,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap()));
    pnlTag2DepLayout.setVerticalGroup(pnlTag2DepLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTag2DepLayout.createSequentialGroup().addContainerGap().addGroup(pnlTag2DepLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtInputTagFile, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBrowseInputTagFile).addComponent(lblInputTagFile))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlTag2DepLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblInputCoNLLFileT2D)
                            .addComponent(txtInputCoNLLFileT2D, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnBrowseInputCoNLLFileT2D))
                    .addGap(8, 8, 8)
                    .addGroup(pnlTag2DepLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlTag2DepLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lblOutputDepPath).addComponent(txtOutputDepPath,
                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(btnBrowseOutputDepPath))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlTag2DepLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pnlPOSTypeT2D, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnConvertTag2Dep))
                    .addContainerGap(140, Short.MAX_VALUE)));

    tabConverter.addTab("Tagger to Dependency", pnlTag2Dep);

    javax.swing.GroupLayout pnlConverterLayout = new javax.swing.GroupLayout(pnlConverter);
    pnlConverter.setLayout(pnlConverterLayout);
    pnlConverterLayout.setHorizontalGroup(pnlConverterLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(pnlConverterLayout
                    .createSequentialGroup().addContainerGap().addComponent(tabConverter).addContainerGap()));
    pnlConverterLayout.setVerticalGroup(pnlConverterLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(pnlConverterLayout
                    .createSequentialGroup().addContainerGap().addComponent(tabConverter).addContainerGap()));

    jTabbedPane1.addTab("Converter", pnlConverter);

    lblTrainFile.setText("Train File:");

    txtTrainFile.setEditable(false);

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

    lblTrainModelPath.setText("Model Path:");

    txtTrainModelPath.setEditable(false);

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

    lblMaxIters.setText("Maximum Iterations:");

    btnStartTraining.setText("Start Training");
    btnStartTraining.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnStartTrainingActionPerformed(evt);
        }
    });

    txtTrainLog.setColumns(20);
    txtTrainLog.setRows(5);
    jScrollbar2.setViewportView(txtTrainLog);

    javax.swing.GroupLayout pnlTrainLayout = new javax.swing.GroupLayout(pnlTrain);
    pnlTrain.setLayout(pnlTrainLayout);
    pnlTrainLayout.setHorizontalGroup(pnlTrainLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTrainLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pnlTrainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollbar2)
                            .addGroup(pnlTrainLayout.createSequentialGroup()
                                    .addGroup(pnlTrainLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lblTrainFile).addComponent(lblTrainModelPath))
                                    .addGap(18, 18, 18)
                                    .addGroup(pnlTrainLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(txtTrainFile).addComponent(txtTrainModelPath))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(pnlTrainLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                    false)
                                            .addComponent(btnBrowseTrainModelPath,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
                                            .addComponent(btnBrowseTrainFile,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 30,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(pnlTrainLayout.createSequentialGroup().addComponent(lblMaxIters)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(spMaxIters, javax.swing.GroupLayout.PREFERRED_SIZE, 97,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 373,
                                            Short.MAX_VALUE)
                                    .addComponent(btnStartTraining)))
                    .addContainerGap()));
    pnlTrainLayout.setVerticalGroup(pnlTrainLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTrainLayout.createSequentialGroup().addContainerGap().addGroup(pnlTrainLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(lblTrainFile)
                    .addComponent(txtTrainFile, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBrowseTrainFile))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(pnlTrainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblTrainModelPath)
                            .addComponent(txtTrainModelPath, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnBrowseTrainModelPath))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlTrainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblMaxIters)
                            .addComponent(spMaxIters, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnStartTraining))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollbar2, javax.swing.GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE)
                    .addContainerGap()));

    jTabbedPane1.addTab("Train", pnlTrain);

    lblInputFile.setText("Input File:");

    txtInputFile.setEditable(false);

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

    lblOutputPath.setText("Output Path:");

    txtOutputPath.setEditable(false);

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

    chkGoldFile.setSelected(true);
    chkGoldFile.setText("Gold File:");

    txtGoldFile.setEditable(false);

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

    txtTagLog.setColumns(20);
    txtTagLog.setEditable(false);
    txtTagLog.setRows(5);
    jScrollPane1.setViewportView(txtTagLog);

    javax.swing.GroupLayout pnlTagLogLayout = new javax.swing.GroupLayout(pnlTagLog);
    pnlTagLog.setLayout(pnlTagLogLayout);
    pnlTagLogLayout
            .setHorizontalGroup(pnlTagLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 664, Short.MAX_VALUE));
    pnlTagLogLayout
            .setVerticalGroup(pnlTagLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE));

    tabTag.addTab("Log", pnlTagLog);

    lblTagEvaluation.setText("Total: 0 - Correct: 0 - Accuracy: 0%");

    lstWordsList.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            lst_mouseClick(evt);
        }
    });
    lstWordsList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
        public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
            lstWoldsList_valueChanged(evt);
        }
    });
    jScrollPane2.setViewportView(lstWordsList);

    lblWordsList.setText("Words List");

    lstPredictedTags.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            lst_mouseClick(evt);
        }
    });
    lstPredictedTags.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
        public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
            lstPredictedTags_valueChanged(evt);
        }
    });
    jScrollPane3.setViewportView(lstPredictedTags);

    lstGoldTags.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            lst_mouseClick(evt);
        }
    });
    lstGoldTags.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
        public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
            lstGoldTags_valueChanged(evt);
        }
    });
    jScrollPane4.setViewportView(lstGoldTags);

    lblPredictedTags.setText("Predicted Tags");

    lblGoldTags.setText("Gold Tags");

    javax.swing.GroupLayout pnlTagResultsLayout = new javax.swing.GroupLayout(pnlTagResults);
    pnlTagResults.setLayout(pnlTagResultsLayout);
    pnlTagResultsLayout.setHorizontalGroup(pnlTagResultsLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTagResultsLayout.createSequentialGroup().addContainerGap().addGroup(pnlTagResultsLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTagResultsLayout
                            .createSequentialGroup()
                            .addGroup(pnlTagResultsLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblWordsList).addComponent(jScrollPane2,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 244,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(pnlTagResultsLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblPredictedTags).addComponent(jScrollPane3,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE))
                            .addGap(7, 7, 7)
                            .addGroup(pnlTagResultsLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 184,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblGoldTags)))
                    .addComponent(lblTagEvaluation, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap()));
    pnlTagResultsLayout.setVerticalGroup(pnlTagResultsLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTagResultsLayout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                            pnlTagResultsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lblWordsList).addComponent(lblPredictedTags)
                                    .addComponent(lblGoldTags))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(pnlTagResultsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 119,
                                    Short.MAX_VALUE)
                            .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 0,
                                    Short.MAX_VALUE)
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 0,
                                    Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(lblTagEvaluation).addContainerGap()));

    tabTag.addTab("Results", pnlTagResults);

    btnStartTagging.setText("Start Tagging");
    btnStartTagging.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnStartTaggingActionPerformed(evt);
        }
    });

    lblModelPath.setText("Model Path:");

    txtModelPath.setEditable(false);

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

    javax.swing.GroupLayout pnlTagLayout = new javax.swing.GroupLayout(pnlTag);
    pnlTag.setLayout(pnlTagLayout);
    pnlTagLayout.setHorizontalGroup(pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTagLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    pnlTagLayout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE)
                                            .addComponent(btnStartTagging))
                            .addComponent(tabTag)
                            .addGroup(pnlTagLayout.createSequentialGroup()
                                    .addGroup(pnlTagLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lblInputFile).addComponent(lblOutputPath)
                                            .addComponent(chkGoldFile).addComponent(lblModelPath))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(pnlTagLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(txtGoldFile).addComponent(txtOutputPath)
                                            .addComponent(txtInputFile).addComponent(txtModelPath))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(pnlTagLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                    false)
                                            .addComponent(btnBrowseModelPath,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                                            .addComponent(btnBrowseGoldFile,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
                                            .addComponent(btnBrowseOutputPath,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
                                            .addComponent(btnBrowseInputFile,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 29,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap()));
    pnlTagLayout
            .setVerticalGroup(pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlTagLayout.createSequentialGroup().addContainerGap()
                            .addGroup(pnlTagLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pnlTagLayout.createSequentialGroup().addGroup(pnlTagLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(lblModelPath)
                                            .addComponent(txtModelPath, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGap(4, 4, 4))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTagLayout
                                            .createSequentialGroup().addComponent(btnBrowseModelPath)
                                            .addPreferredGap(
                                                    javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                            .addGroup(
                                    pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(lblInputFile)
                                            .addComponent(txtInputFile, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(btnBrowseInputFile))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(
                                    pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(lblOutputPath)
                                            .addComponent(txtOutputPath, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(btnBrowseOutputPath))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(
                                    pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(chkGoldFile)
                                            .addComponent(txtGoldFile, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(btnBrowseGoldFile))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(btnStartTagging)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(tabTag).addContainerGap()));

    jTabbedPane1.addTab("Tag", pnlTag);

    pnlAbout.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            pnlAbout_Shown(evt);
        }
    });

    lblMXPostTitle.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
    lblMXPostTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    lblMXPostTitle.setText("MXPost (Version 1.0)");

    lblMXPostSiteTitle.setText("Site:");

    lblMXPostSiteValue.setEditable(false);
    lblMXPostSiteValue.setForeground(new java.awt.Color(0, 102, 204));
    lblMXPostSiteValue.setText("http://www.inf.ed.ac.uk/resources/nlp/local_doc/MXPOST.html");
    lblMXPostSiteValue.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
    lblMXPostSiteValue.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

    lblMXPostAuthorsTitle.setText("Authors:");

    lblMXPostAuthorsValue.setEditable(false);
    lblMXPostAuthorsValue.setText("Adwait Ratnaparkhi");
    lblMXPostAuthorsValue.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));

    lblMXPostCitationTitle.setText("Citation:");

    txtMXPostCitationValue.setColumns(20);
    txtMXPostCitationValue.setEditable(false);
    txtMXPostCitationValue.setLineWrap(true);
    txtMXPostCitationValue.setRows(5);
    txtMXPostCitationValue.setText(
            "A. Ratnaparkhi, \"A maximum entropy model for part-of-speech tagging\", in Proceedings of the Empirical Methods in Natural Language Processing Conference, University of Pennsylvania, pp. 133-142, 1996.");
    jScrollPane9.setViewportView(txtMXPostCitationValue);

    lblMXpostLicenseTitle.setText("License");

    txtMXPostLicenseValue.setColumns(20);
    txtMXPostLicenseValue.setEditable(false);
    txtMXPostLicenseValue.setRows(5);
    txtMXPostLicenseValue.setText(
            "                              SOFTWARE LICENSE\n\n                          MXPOST and MXTERMINATOR\n\n                            All rights reserved.\n\n                        (c) 1997 Adwait Ratnaparkhi\n\n                      Developed by Adwait Ratnaparkhi\n                         University of Pennsylvania\n                 Dept. of Computer and Information Science\n                           200 South 33rd Street\n                          Philadelphia, PA. 19104\n\n   LICENSE INFORMATION\n\n   Adwait Ratnaparkhi (\"Owner\") grants to the individual researcher who\n   downloads this software (\"Licensee\") a non-exclusive, non-transferable\n   run-time license to use the MXPOST and MXTERMINATOR software\n   (\"Software\"), subject to the restrictions listed below under \"Scope of\n   Grant.\"\n\n   SCOPE OF GRANT\n\n   The Licensee may:\n     * use the Software for educational or research purposes;\n     * permit others under the Licensee's supervision at the same site to\n       use the Software for educational or research purposes;\n     * copy the Software for archival purposes, provided that any such\n       copy contains all of the original proprietary notices.\n\n   The Licensee may not:\n     * use the Software for commercial purposes;\n     * allow any individual who is not under the direct supervision of\n       the Licensee to use the Software;\n     * redistribute the Software;\n     * copy the Software other than as specified above;\n     * rent, lease, grant a security interest in, or otherwise transfer\n       rights to the Software;\n     * remove any proprietary notices or labels accompanying the\n       Software;\n\n   DISCLAIMER\n\n   The Owner makes no representations or warranties about the suitability\n   of the Software and Linguistic Resources, either express or implied,\n   including but not limited to the implied warranties of\n   merchantability, fitness for a particular purpose, or\n   non-infringement. The Owner shall not be liable for any damages\n   suffered by Licensee as a result of using, modifying or distributing\n   the Software or its derivatives.\n\n   CONSENT\n\n   By downloading, using or copying the Software, Licensee agrees to\n   abide by the intellectual property laws, and all other applicable laws\n   of the U.S., and the terms of this License. Ownership of the Software\n   shall remain solely with the Owner.\n\n   TERMINATION\n\n   The Owner shall have the right to terminate this license at any time\n   by written notice. Licensee shall be liable for any infringement or\n   damages resulting from Licensee's failure to abide by the terms of\n   this License.");
    jScrollPane5.setViewportView(txtMXPostLicenseValue);

    javax.swing.GroupLayout pnlAboutLayout = new javax.swing.GroupLayout(pnlAbout);
    pnlAbout.setLayout(pnlAboutLayout);
    pnlAboutLayout.setHorizontalGroup(pnlAboutLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlAboutLayout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblMXPostTitle, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlAboutLayout
                                    .createSequentialGroup()
                                    .addGroup(pnlAboutLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lblMXpostLicenseTitle)
                                            .addComponent(lblMXPostCitationTitle))
                                    .addGap(11, 11, 11)
                                    .addGroup(pnlAboutLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane9).addComponent(jScrollPane5)))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlAboutLayout
                                    .createSequentialGroup()
                                    .addGroup(pnlAboutLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lblMXPostAuthorsTitle)
                                            .addComponent(lblMXPostSiteTitle))
                                    .addGap(10, 10, 10)
                                    .addGroup(pnlAboutLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lblMXPostSiteValue,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, 617, Short.MAX_VALUE)
                                            .addComponent(lblMXPostAuthorsValue))))
                    .addContainerGap()));
    pnlAboutLayout.setVerticalGroup(pnlAboutLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAboutLayout.createSequentialGroup().addContainerGap().addComponent(lblMXPostTitle)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblMXPostSiteTitle).addComponent(lblMXPostSiteValue,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblMXPostAuthorsTitle).addComponent(lblMXPostAuthorsValue,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlAboutLayout.createSequentialGroup()
                                    .addComponent(lblMXPostCitationTitle).addGap(0, 91, Short.MAX_VALUE))
                            .addGroup(pnlAboutLayout.createSequentialGroup()
                                    .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9,
                                            Short.MAX_VALUE)))
                    .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(pnlAboutLayout.createSequentialGroup().addComponent(lblMXpostLicenseTitle)
                                    .addGap(0, 0, Short.MAX_VALUE))
                            .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 155,
                                    Short.MAX_VALUE))
                    .addContainerGap()));

    jTabbedPane1.addTab("About", pnlAbout);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jTabbedPane1));
    layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jTabbedPane1));

    pack();
}

From source file:client.ui.FilePane.java

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

    fileButtonPane = new JPanel();
    uploadFileButton = new JButton();
    downloadFileButton = new JButton();
    deleteFileButton = new JButton();
    renameFileButton = new JButton();
    authorizationButton = new JButton();
    jSeparator1 = new JSeparator();
    addNoteButton = new JButton();
    deleteNoteButton = new JButton();
    jSeparator2 = new JSeparator();
    targetIDField = new JTextField();
    searchUserButton = new JButton();
    returnButton = new JButton();
    jSeparator3 = new JSeparator();
    refreshButton = new JButton();
    jSeparator4 = new JSeparator();
    changePasswdButton = new JButton();
    fileSplitPane = new JSplitPane();
    jSplitPane2 = new JSplitPane();
    fileInfoScroll = new JScrollPane();
    fileInfoTable = new JTable();
    noteDisplayScroll = new JScrollPane();
    noteTable = new JTable();
    jSplitPane1 = new JSplitPane();
    fileDisplayScroll = new JScrollPane();
    fileContentArea = new JTextArea();
    noteInputScroll = new JScrollPane();
    noteInputArea = new JTextArea();

    FormListener formListener = new FormListener();

    setForeground(new Color(240, 240, 240));
    setFont(new Font("", 0, 12)); // NOI18N
    setMaximumSize(new Dimension(1366, 768));
    setPreferredSize(new Dimension(1366, 700));

    fileButtonPane.setMaximumSize(new Dimension(32767, 50));
    fileButtonPane.setMinimumSize(new Dimension(404, 50));

    uploadFileButton.setFont(new Font("", 0, 12)); // NOI18N
    uploadFileButton.setText("");
    uploadFileButton.setActionCommand("JButton1");
    uploadFileButton.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    uploadFileButton.setBorderPainted(false);
    uploadFileButton.setContentAreaFilled(false);
    uploadFileButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    uploadFileButton.setFocusPainted(false);
    uploadFileButton.setMaximumSize(new Dimension(30, 20));
    uploadFileButton.setMinimumSize(new Dimension(30, 20));
    uploadFileButton.addMouseListener(formListener);
    uploadFileButton.addActionListener(formListener);

    downloadFileButton.setFont(new Font("", 0, 12)); // NOI18N
    downloadFileButton.setText("");
    downloadFileButton.setActionCommand("JButton1");
    downloadFileButton.setBorder(null);
    downloadFileButton.setBorderPainted(false);
    downloadFileButton.setContentAreaFilled(false);
    downloadFileButton.setEnabled(false);
    downloadFileButton.setFocusPainted(false);
    downloadFileButton.setMaximumSize(new Dimension(30, 20));
    downloadFileButton.setMinimumSize(new Dimension(30, 20));
    downloadFileButton.setPreferredSize(new Dimension(30, 20));
    downloadFileButton.addMouseListener(formListener);
    downloadFileButton.addActionListener(formListener);

    deleteFileButton.setFont(new Font("", 0, 12)); // NOI18N
    deleteFileButton.setText("");
    deleteFileButton.setBorder(null);
    deleteFileButton.setBorderPainted(false);
    deleteFileButton.setContentAreaFilled(false);
    deleteFileButton.setEnabled(false);
    deleteFileButton.setFocusPainted(false);
    deleteFileButton.addMouseListener(formListener);
    deleteFileButton.addActionListener(formListener);

    renameFileButton.setFont(new Font("", 0, 12)); // NOI18N
    renameFileButton.setText("???");
    renameFileButton.setBorder(null);
    renameFileButton.setBorderPainted(false);
    renameFileButton.setContentAreaFilled(false);
    renameFileButton.setEnabled(false);
    renameFileButton.setFocusPainted(false);
    renameFileButton.addMouseListener(formListener);
    renameFileButton.addActionListener(formListener);

    authorizationButton.setFont(new Font("", 0, 12)); // NOI18N
    authorizationButton.setText("??");
    authorizationButton.setBorder(null);
    authorizationButton.setBorderPainted(false);
    authorizationButton.setContentAreaFilled(false);
    authorizationButton.setEnabled(false);
    authorizationButton.setFocusPainted(false);
    authorizationButton.addMouseListener(formListener);
    authorizationButton.addActionListener(formListener);

    jSeparator1.setOrientation(SwingConstants.VERTICAL);

    addNoteButton.setFont(new Font("", 0, 12)); // NOI18N
    addNoteButton.setText("");
    addNoteButton.setActionCommand("JButton1");
    addNoteButton.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    addNoteButton.setBorderPainted(false);
    addNoteButton.setContentAreaFilled(false);
    addNoteButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    addNoteButton.setEnabled(false);
    addNoteButton.setFocusPainted(false);
    addNoteButton.setMaximumSize(new Dimension(30, 20));
    addNoteButton.setMinimumSize(new Dimension(30, 20));
    addNoteButton.addMouseListener(formListener);
    addNoteButton.addActionListener(formListener);

    deleteNoteButton.setFont(new Font("", 0, 12)); // NOI18N
    deleteNoteButton.setText("");
    deleteNoteButton.setActionCommand("JButton1");
    deleteNoteButton.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    deleteNoteButton.setBorderPainted(false);
    deleteNoteButton.setContentAreaFilled(false);
    deleteNoteButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    deleteNoteButton.setEnabled(false);
    deleteNoteButton.setFocusPainted(false);
    deleteNoteButton.setMaximumSize(new Dimension(30, 20));
    deleteNoteButton.setMinimumSize(new Dimension(30, 20));
    deleteNoteButton.addMouseListener(formListener);
    deleteNoteButton.addActionListener(formListener);

    jSeparator2.setOrientation(SwingConstants.VERTICAL);

    targetIDField.setFont(new Font("", 0, 12)); // NOI18N

    searchUserButton.setFont(new Font("", 0, 12)); // NOI18N
    searchUserButton.setText("");
    searchUserButton.setActionCommand("JButton1");
    searchUserButton.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    searchUserButton.setBorderPainted(false);
    searchUserButton.setContentAreaFilled(false);
    searchUserButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    searchUserButton.setFocusPainted(false);
    searchUserButton.setMaximumSize(new Dimension(30, 20));
    searchUserButton.setMinimumSize(new Dimension(30, 20));
    searchUserButton.addMouseListener(formListener);
    searchUserButton.addActionListener(formListener);

    returnButton.setFont(new Font("", 0, 12)); // NOI18N
    returnButton.setText("");
    returnButton.setActionCommand("JButton1");
    returnButton.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    returnButton.setBorderPainted(false);
    returnButton.setContentAreaFilled(false);
    returnButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    returnButton.setFocusPainted(false);
    returnButton.setMaximumSize(new Dimension(30, 20));
    returnButton.setMinimumSize(new Dimension(30, 20));
    returnButton.addMouseListener(formListener);
    returnButton.addActionListener(formListener);

    jSeparator3.setOrientation(SwingConstants.VERTICAL);

    refreshButton.setFont(new Font("", 0, 12)); // NOI18N
    refreshButton.setText("");
    refreshButton.setActionCommand("JButton1");
    refreshButton.setBorder(null);
    refreshButton.setBorderPainted(false);
    refreshButton.setContentAreaFilled(false);
    refreshButton.setFocusPainted(false);
    refreshButton.setMaximumSize(new Dimension(30, 20));
    refreshButton.setMinimumSize(new Dimension(30, 20));
    refreshButton.setPreferredSize(new Dimension(30, 20));
    refreshButton.addMouseListener(formListener);
    refreshButton.addActionListener(formListener);

    jSeparator4.setOrientation(SwingConstants.VERTICAL);

    changePasswdButton.setFont(new Font("", 0, 12)); // NOI18N
    changePasswdButton.setText("?");
    changePasswdButton.setActionCommand("JButton1");
    changePasswdButton.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    changePasswdButton.setBorderPainted(false);
    changePasswdButton.setContentAreaFilled(false);
    changePasswdButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    changePasswdButton.setFocusPainted(false);
    changePasswdButton.setMaximumSize(new Dimension(30, 20));
    changePasswdButton.setMinimumSize(new Dimension(30, 20));
    changePasswdButton.addMouseListener(formListener);
    changePasswdButton.addActionListener(formListener);

    GroupLayout fileButtonPaneLayout = new GroupLayout(fileButtonPane);
    fileButtonPane.setLayout(fileButtonPaneLayout);
    fileButtonPaneLayout.setHorizontalGroup(fileButtonPaneLayout
            .createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(fileButtonPaneLayout.createSequentialGroup()
                    .addComponent(uploadFileButton, GroupLayout.PREFERRED_SIZE, 46, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(downloadFileButton, GroupLayout.PREFERRED_SIZE, 46,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(deleteFileButton, GroupLayout.PREFERRED_SIZE, 46, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(renameFileButton, GroupLayout.PREFERRED_SIZE, 57, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(authorizationButton, GroupLayout.PREFERRED_SIZE, 63,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jSeparator1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(addNoteButton, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(deleteNoteButton, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jSeparator2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(targetIDField, GroupLayout.PREFERRED_SIZE, 115, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(searchUserButton, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(returnButton, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jSeparator3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(refreshButton, GroupLayout.PREFERRED_SIZE, 46, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jSeparator4, GroupLayout.PREFERRED_SIZE, 2, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(changePasswdButton,
                            GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(18, Short.MAX_VALUE)));
    fileButtonPaneLayout.setVerticalGroup(fileButtonPaneLayout
            .createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING,
                    fileButtonPaneLayout.createSequentialGroup().addContainerGap().addGroup(fileButtonPaneLayout
                            .createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(jSeparator4)
                            .addGroup(fileButtonPaneLayout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE)
                                    .addGroup(fileButtonPaneLayout
                                            .createParallelGroup(GroupLayout.Alignment.TRAILING)
                                            .addComponent(changePasswdButton, GroupLayout.PREFERRED_SIZE, 25,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addGroup(fileButtonPaneLayout
                                                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                                                    .addComponent(refreshButton, GroupLayout.PREFERRED_SIZE, 25,
                                                            GroupLayout.PREFERRED_SIZE)
                                                    .addGroup(fileButtonPaneLayout
                                                            .createParallelGroup(
                                                                    GroupLayout.Alignment.TRAILING, false)
                                                            .addComponent(jSeparator2)
                                                            .addGroup(fileButtonPaneLayout
                                                                    .createParallelGroup(
                                                                            GroupLayout.Alignment.BASELINE)
                                                                    .addComponent(addNoteButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE)
                                                                    .addComponent(deleteNoteButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE))
                                                            .addComponent(jSeparator1)
                                                            .addGroup(fileButtonPaneLayout
                                                                    .createParallelGroup(
                                                                            GroupLayout.Alignment.BASELINE)
                                                                    .addComponent(downloadFileButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE)
                                                                    .addComponent(deleteFileButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE)
                                                                    .addComponent(renameFileButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE)
                                                                    .addComponent(authorizationButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE)
                                                                    .addComponent(uploadFileButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE))
                                                            .addComponent(jSeparator3)
                                                            .addGroup(GroupLayout.Alignment.LEADING,
                                                                    fileButtonPaneLayout.createParallelGroup(
                                                                            GroupLayout.Alignment.BASELINE)
                                                                            .addComponent(targetIDField)
                                                                            .addComponent(searchUserButton,
                                                                                    GroupLayout.PREFERRED_SIZE,
                                                                                    25,
                                                                                    GroupLayout.PREFERRED_SIZE)
                                                                            .addComponent(returnButton,
                                                                                    GroupLayout.PREFERRED_SIZE,
                                                                                    25,
                                                                                    GroupLayout.PREFERRED_SIZE)))))))
                            .addGap(15, 15, 15)));

    fileSplitPane.setBackground(new Color(255, 255, 255));
    fileSplitPane.setDividerLocation(750);
    fileSplitPane.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    fileSplitPane.setMaximumSize(new Dimension(1366, 768));
    fileSplitPane.setPreferredSize(new Dimension(701, 646));

    jSplitPane2.setDividerLocation(400);
    jSplitPane2.setOrientation(JSplitPane.VERTICAL_SPLIT);
    jSplitPane2.setContinuousLayout(true);
    jSplitPane2.setMaximumSize(new Dimension(1366, 768));

    fileInfoScroll.setBackground(new Color(255, 255, 255));
    fileInfoScroll.setFont(new Font("", 0, 12)); // NOI18N
    fileInfoScroll.getViewport().setBackground(Color.WHITE);
    fileInfoScroll.addMouseListener(formListener);

    fileInfoTable.setAutoCreateRowSorter(true);
    fileInfoTable.setFont(new Font("", 0, 12)); // NOI18N
    fileInfoTable.setModel(fileTableModel);
    fileInfoTable.getTableHeader().setFont(new Font("", 0, 12));
    fileInfoTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
    fileInfoTable.setRowHeight(20);
    fileInfoTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    fileInfoTable.setShowHorizontalLines(false);
    fileInfoTable.setShowVerticalLines(false);
    fileInfoTable.addMouseListener(formListener);
    fileInfoTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {

        public void valueChanged(ListSelectionEvent evt) {
            fileSelectedChanged(evt);
        }
    });
    fileInfoScroll.setViewportView(fileInfoTable);

    jSplitPane2.setTopComponent(fileInfoScroll);

    noteDisplayScroll.setBackground(new Color(255, 255, 255));
    noteDisplayScroll.setFont(new Font("", 0, 12)); // NOI18N
    noteDisplayScroll.getViewport().setBackground(Color.WHITE);
    noteDisplayScroll.addMouseListener(formListener);

    noteTable.setAutoCreateRowSorter(true);
    noteTable.setFont(new Font("", 0, 12)); // NOI18N
    noteTable.setModel(noteTableModel);
    noteTable.getTableHeader().setFont(new Font("", 0, 12));
    noteTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
    noteTable.setRowHeight(20);
    noteTable.setShowHorizontalLines(false);
    noteTable.setShowVerticalLines(false);
    noteTable.addMouseListener(formListener);
    noteTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent evt) {
            noteSelectedChanged(evt);
        }
    });
    noteDisplayScroll.setViewportView(noteTable);

    jSplitPane2.setBottomComponent(noteDisplayScroll);

    fileSplitPane.setLeftComponent(jSplitPane2);

    jSplitPane1.setDividerLocation(500);
    jSplitPane1.setOrientation(JSplitPane.VERTICAL_SPLIT);

    fileDisplayScroll.setFont(new Font("", 0, 12)); // NOI18N
    fileDisplayScroll.setMinimumSize(new Dimension(30, 30));

    fileContentArea.setEditable(false);
    fileContentArea.setColumns(20);
    fileContentArea.setFont(new Font("", 0, 12)); // NOI18N
    fileContentArea.setRows(5);
    fileContentArea.setToolTipText("");
    fileContentArea
            .setBorder(BorderFactory.createTitledBorder(null, "", TitledBorder.DEFAULT_JUSTIFICATION,
                    TitledBorder.DEFAULT_POSITION, new Font("", 0, 12))); // NOI18N
    fileDisplayScroll.setViewportView(fileContentArea);

    jSplitPane1.setTopComponent(fileDisplayScroll);

    noteInputScroll.setFont(new Font("", 0, 12)); // NOI18N
    noteInputScroll.setMaximumSize(new Dimension(1366, 768));
    noteInputScroll.setMinimumSize(new Dimension(30, 30));

    noteInputArea.setColumns(20);
    noteInputArea.setFont(new Font("", 0, 12)); // NOI18N
    noteInputArea.setRows(5);
    noteInputArea.setToolTipText("");
    noteInputArea
            .setBorder(BorderFactory.createTitledBorder(null, "", TitledBorder.DEFAULT_JUSTIFICATION,
                    TitledBorder.DEFAULT_POSITION, new Font("", 0, 12))); // NOI18N
    noteInputScroll.setViewportView(noteInputArea);

    jSplitPane1.setBottomComponent(noteInputScroll);

    fileSplitPane.setRightComponent(jSplitPane1);

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addComponent(fileSplitPane, GroupLayout.DEFAULT_SIZE, 1346, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(fileButtonPane, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE)))
            .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addComponent(fileButtonPane, GroupLayout.PREFERRED_SIZE, 38, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(fileSplitPane,
                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));
}

From source file:org.gwaspi.gui.reports.ManhattanPlotZoom.java

private void initGUI() {

    setCursor(CursorUtils.WAIT_CURSOR);//w  w  w  . j av a 2s  .  c  o  m

    pnl_ChartNavigator = new JPanel();
    pnl_Chart = new JPanel();
    pnl_SearchDB = new JPanel();
    cmb_SearchDB = new JComboBox();
    scrl_Chart = new JScrollPane();
    pnl_Footer = new JPanel();
    pnl_FooterGroup1 = new JPanel();
    btn_Save = new JButton();
    btn_Reset = new JButton();
    btn_Back = new JButton();
    btn_Back2 = new JButton();

    final String titlePlot;
    if (origMarkerKey == null) {
        titlePlot = ": Chr" + currentChr + " - Pos: " + startPhysPos + " to "
                + (startPhysPos + requestedPosWindow);
    } else {
        titlePlot = ": " + origMarkerKey.toString() + " - Chr" + currentChr;
    }

    pnl_ChartNavigator
            .setBorder(GWASpiExplorerPanel.createMainTitledBorder("Manhattan Plot Navigator" + titlePlot)); // NOI18N

    pnl_Chart.setBorder(GWASpiExplorerPanel.createLineBorder());

    scrl_Chart.getViewport().add(zoomPanel);
    pnl_Chart.add(scrl_Chart, BorderLayout.CENTER);

    // <editor-fold defaultstate="expanded" desc="LAYOUT1">
    GroupLayout pnl_ChartLayout = new GroupLayout(pnl_Chart);
    pnl_Chart.setLayout(pnl_ChartLayout);
    pnl_ChartLayout.setHorizontalGroup(pnl_ChartLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addComponent(scrl_Chart, GroupLayout.DEFAULT_SIZE, 812, Short.MAX_VALUE));
    pnl_ChartLayout.setVerticalGroup(pnl_ChartLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addComponent(scrl_Chart, GroupLayout.DEFAULT_SIZE, 437, Short.MAX_VALUE));

    GroupLayout pnl_ChartNavigatorLayout = new GroupLayout(pnl_ChartNavigator);
    pnl_ChartNavigator.setLayout(pnl_ChartNavigatorLayout);
    pnl_ChartNavigatorLayout.setHorizontalGroup(pnl_ChartNavigatorLayout
            .createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING,
                    pnl_ChartNavigatorLayout
                            .createSequentialGroup().addContainerGap().addComponent(pnl_Chart,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addContainerGap()));
    pnl_ChartNavigatorLayout
            .setVerticalGroup(pnl_ChartNavigatorLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(pnl_ChartNavigatorLayout
                            .createSequentialGroup().addContainerGap().addComponent(pnl_Chart,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addContainerGap()));
    // </editor-fold>

    String lblChr = "Chr ";
    Long currPos = 0L;
    lblChr += currentChr;
    if (centerPhysPos > 0) {
        currPos = centerPhysPos;
    } else {
        currPos = Math.round((double) MARKERS_NUM_DEFAULT / 2);
    }

    //<editor-fold defaultstate="expanded" desc="TRACKER">
    //      pnl_Tracker.setBorder(GWASpiExplorerPanel.createRegularTitledBorder("Marker N on "+lblChr));
    //
    //
    //      slid_Tracker.setMaximum(max);
    //      slid_Tracker.setValue(currPos);
    //      slid_Tracker.addMouseListener(new event.MouseAdapter() {
    //         public void mouseReleased(event.MouseEvent evt) {
    //            actionSlide();
    //         }
    //      });
    //
    //      GroupLayout pnl_TrackerLayout = new GroupLayout(pnl_Tracker);
    //      pnl_Tracker.setLayout(pnl_TrackerLayout);
    //      pnl_TrackerLayout.setHorizontalGroup(
    //            pnl_TrackerLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    //            .addGroup(GroupLayout.Alignment.TRAILING, pnl_TrackerLayout.createSequentialGroup()
    //            .addGap(18, 18, 18)
    //            .addComponent(slid_Tracker, GroupLayout.DEFAULT_SIZE, 814, Short.MAX_VALUE)
    //            .addContainerGap())
    //            );
    //      pnl_TrackerLayout.setVerticalGroup(
    //            pnl_TrackerLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    //            .addGroup(pnl_TrackerLayout.createSequentialGroup()
    //            .addContainerGap()
    //            .addComponent(slid_Tracker, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
    //            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    //            );
    //</editor-fold>

    //<editor-fold defaultstate="expanded" desc="EXTERNAL RESOURCE DBs">
    pnl_SearchDB = new JPanel();
    pnl_SearchDB.setBorder(GWASpiExplorerPanel.createRegularTitledBorder(Text.Reports.externalResourceDB));
    cmb_SearchDB = new JComboBox();
    cmb_SearchDB.setModel(new DefaultComboBoxModel(LinksExternalResouces.getLinkNames()));

    GroupLayout pnl_SearchDBLayout = new GroupLayout(pnl_SearchDB);
    pnl_SearchDB.setLayout(pnl_SearchDBLayout);
    pnl_SearchDBLayout.setHorizontalGroup(pnl_SearchDBLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(pnl_SearchDBLayout.createSequentialGroup().addContainerGap()
                    .addComponent(cmb_SearchDB, 0, 614, Short.MAX_VALUE).addContainerGap()));
    pnl_SearchDBLayout.setVerticalGroup(pnl_SearchDBLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(pnl_SearchDBLayout
                    .createSequentialGroup().addComponent(cmb_SearchDB, GroupLayout.PREFERRED_SIZE,
                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(14, Short.MAX_VALUE)));
    //</editor-fold>

    btn_Save.setAction(new SampleQAHetzygPlotZoom.SaveAsAction("zoom_" + origMarkerKey + ".png", scrl_Chart,
            zoomChart, this));

    btn_Reset.setAction(new ResetAction(testOpKey));

    btn_Back.setAction(new BackToTableAction());

    btn_Back2.setAction(new BackToManhattanPlotAction());

    // <editor-fold defaultstate="expanded" desc="FOOTER">
    GroupLayout pnl_FooterGroup1Layout = new GroupLayout(pnl_FooterGroup1);
    pnl_FooterGroup1.setLayout(pnl_FooterGroup1Layout);
    pnl_FooterGroup1Layout.setHorizontalGroup(pnl_FooterGroup1Layout
            .createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING,
                    pnl_FooterGroup1Layout.createSequentialGroup().addContainerGap()
                            .addComponent(btn_Reset, GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE)
                            .addGap(18, 18, 18)
                            .addComponent(btn_Save, GroupLayout.PREFERRED_SIZE, 96, GroupLayout.PREFERRED_SIZE)
                            .addContainerGap()));

    pnl_FooterGroup1Layout.linkSize(SwingConstants.HORIZONTAL, new Component[] { btn_Reset, btn_Save });

    pnl_FooterGroup1Layout
            .setVerticalGroup(pnl_FooterGroup1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(pnl_FooterGroup1Layout.createSequentialGroup()
                            .addGroup(pnl_FooterGroup1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(btn_Save).addComponent(btn_Reset))
                            .addContainerGap(16, Short.MAX_VALUE)));

    pnl_FooterGroup1Layout.linkSize(SwingConstants.VERTICAL, new Component[] { btn_Reset, btn_Save });

    GroupLayout pnl_FooterLayout = new GroupLayout(pnl_Footer);
    pnl_Footer.setLayout(pnl_FooterLayout);
    pnl_FooterLayout.setHorizontalGroup(pnl_FooterLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(pnl_FooterLayout.createSequentialGroup().addContainerGap().addComponent(btn_Back)
                    .addGap(18, 18, 18).addComponent(btn_Back2)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 368, Short.MAX_VALUE)
                    .addComponent(pnl_FooterGroup1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));
    pnl_FooterLayout.setVerticalGroup(pnl_FooterLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(pnl_FooterLayout.createSequentialGroup().addContainerGap().addGroup(pnl_FooterLayout
                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(GroupLayout.Alignment.TRAILING, pnl_FooterLayout.createSequentialGroup()
                            .addGroup(pnl_FooterLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(btn_Back).addComponent(btn_Back2))
                            .addGap(71, 71, 71))
                    .addGroup(GroupLayout.Alignment.TRAILING,
                            pnl_FooterLayout.createSequentialGroup()
                                    .addComponent(pnl_FooterGroup1, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addGap(55, 55, 55)))));
    // </editor-fold>

    // <editor-fold defaultstate="expanded" desc="LAYOUT">
    //      GroupLayout layout = new GroupLayout(this);
    //      this.setLayout(layout);
    //      layout.setHorizontalGroup(
    //            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
    //            .addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    //            .addContainerGap()
    //            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
    //            .addComponent(pnl_Tracker, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    //            .addComponent(pnl_ChartNavigator, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    //            .addComponent(pnl_Footer, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    //            .addContainerGap())
    //            );
    //      layout.setVerticalGroup(
    //            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
    //            .addGroup(layout.createSequentialGroup()
    //            .addComponent(pnl_ChartNavigator, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
    //            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    //            .addComponent(pnl_Tracker, GroupLayout.PREFERRED_SIZE, 86, GroupLayout.PREFERRED_SIZE)
    //            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    //            .addComponent(pnl_Footer, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
    //            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    //            );

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addComponent(pnl_SearchDB, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(pnl_ChartNavigator, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addComponent(pnl_Footer, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addContainerGap()));
    layout.setVerticalGroup(
            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(pnl_ChartNavigator, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(pnl_SearchDB, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(pnl_Footer,
                                    GroupLayout.PREFERRED_SIZE, 55, GroupLayout.PREFERRED_SIZE)
                            .addContainerGap()));
    // </editor-fold>

    setCursor(CursorUtils.DEFAULT_CURSOR);
}

From source file:gtu._work.ui.ExportSVNModificationFilesUI.java

private void initGUI() {
    try {//from  w  w  w.ja v a 2  s  .co m
        final SwingActionUtil swingUtil = SwingActionUtil.newInstance(this);

        BorderLayout thisLayout = new BorderLayout();
        getContentPane().setLayout(thisLayout);
        this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        this.setTitle("SVN BACKUP");
        this.setPreferredSize(new java.awt.Dimension(734, 442));
        {
            jTabbedPane1 = new JTabbedPane();
            getContentPane().add(jTabbedPane1, BorderLayout.CENTER);
            jTabbedPane1.addChangeListener(new ChangeListener() {
                public void stateChanged(ChangeEvent evt) {
                    swingUtil.invokeAction("jTabbedPane1_changeEvent", evt);
                }
            });
            {
                jPanel1 = new JPanel();
                BorderLayout jPanel1Layout = new BorderLayout();
                jPanel1.setLayout(jPanel1Layout);
                jTabbedPane1.addTab("src text", null, jPanel1, null);
                {
                    jScrollPane1 = new JScrollPane();
                    jPanel1.add(jScrollPane1, BorderLayout.CENTER);
                    {
                        srcArea = new JTextArea();
                        jScrollPane1.setViewportView(srcArea);
                    }
                }
                {
                    loadSrcTextarea = new JButton();
                    jPanel1.add(loadSrcTextarea, BorderLayout.SOUTH);
                    loadSrcTextarea.setText("load src textarea");
                    loadSrcTextarea.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            swingUtil.invokeAction("loadSrcTextarea.actionPerformed", evt);
                        }
                    });
                }
                {
                    srcBaseDir = new JButton();
                    jPanel1.add(srcBaseDir, BorderLayout.NORTH);
                    srcBaseDir.setText("set src base dir");
                    srcBaseDir.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            swingUtil.invokeAction("srcBaseDir.actionPerformed", evt);
                        }
                    });
                }
            }
            {
                jPanel2 = new JPanel();
                BorderLayout jPanel2Layout = new BorderLayout();
                jPanel2.setLayout(jPanel2Layout);
                jTabbedPane1.addTab("src list", null, jPanel2, null);
                {
                    jScrollPane2 = new JScrollPane();
                    jPanel2.add(jScrollPane2, BorderLayout.CENTER);
                    jScrollPane2.setPreferredSize(new java.awt.Dimension(531, 317));
                    {
                        ListModel srcListModel = new DefaultListModel();
                        srcList = new JList();
                        jScrollPane2.setViewportView(srcList);
                        srcList.setModel(srcListModel);
                        srcList.addMouseListener(new MouseAdapter() {
                            public void mouseClicked(MouseEvent evt) {
                                swingUtil.invokeAction("srcList.mouseClicked", evt);
                            }
                        });
                        srcList.addKeyListener(new KeyAdapter() {
                            public void keyPressed(KeyEvent evt) {
                                swingUtil.invokeAction("srcList.keyPressed", evt);
                            }
                        });
                    }
                }
                {
                    srcListQuery = new JTextField();
                    srcListQuery.getDocument()
                            .addDocumentListener(JCommonUtil.getDocumentListener(new HandleDocumentEvent() {
                                public void process(DocumentEvent event) {
                                    String scan = JCommonUtil.getDocumentText(event);
                                    DefaultListModel model = new DefaultListModel();
                                    Pattern pat = Pattern.compile(scan);
                                    for (LineParser line : copySrcListForQuerySet) {
                                        if (!line.file.exists()) {
                                            continue;
                                        }
                                        if (line.file.getAbsolutePath().contains(scan)) {
                                            model.addElement(line);
                                            continue;
                                        }
                                        try {
                                            if (pat.matcher(line.file.getAbsolutePath()).find()) {
                                                model.addElement(line);
                                                continue;
                                            }
                                        } catch (Exception ex) {
                                        }
                                    }
                                    srcList.setModel(model);
                                }
                            }));
                    jPanel2.add(srcListQuery, BorderLayout.NORTH);
                }
            }
            {
                jPanel3 = new JPanel();
                BorderLayout jPanel3Layout = new BorderLayout();
                jPanel3.setLayout(jPanel3Layout);
                jTabbedPane1.addTab("out list", null, jPanel3, null);
                {
                    jScrollPane3 = new JScrollPane();
                    jPanel3.add(jScrollPane3, BorderLayout.CENTER);
                    {
                        ListModel outPutListModel = new DefaultListModel();
                        outPutList = new JList();
                        jScrollPane3.setViewportView(outPutList);
                        outPutList.setModel(outPutListModel);
                        outPutList.addMouseListener(new MouseAdapter() {
                            public void mouseClicked(MouseEvent evt) {
                                swingUtil.invokeAction("outPutList.mouseClicked", evt);
                            }
                        });
                        outPutList.addKeyListener(new KeyAdapter() {
                            public void keyPressed(KeyEvent evt) {
                                swingUtil.invokeAction("outPutList.keyPressed", evt);
                            }
                        });
                    }
                }
                {
                    outPutDir = new JButton();
                    jPanel3.add(outPutDir, BorderLayout.NORTH);
                    outPutDir.setText("set output dir");
                    outPutDir.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            swingUtil.invokeAction("outPutDir.actionPerformed", evt);
                        }
                    });
                }
                {
                    execute = new JButton();
                    jPanel3.add(execute, BorderLayout.SOUTH);
                    execute.setText("execute backup");
                    execute.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            swingUtil.invokeAction("execute.actionPerformed", evt);
                        }
                    });
                }
            }
            {
                jPanel4 = new JPanel();
                BorderLayout jPanel4Layout = new BorderLayout();
                jPanel4.setLayout(jPanel4Layout);
                jTabbedPane1.addTab("compre", null, jPanel4, null);
                {
                    jScrollPane4 = new JScrollPane();
                    jPanel4.add(jScrollPane4, BorderLayout.CENTER);
                    jScrollPane4.setPreferredSize(new java.awt.Dimension(713, 339));
                    {
                        TableModel compareTableModel = new DefaultTableModel();
                        compareTable = new JTable();
                        jScrollPane4.setViewportView(compareTable);
                        compareTable.setModel(compareTableModel);
                        JTableUtil.defaultSetting(compareTable);
                        compareTable.addMouseListener(new MouseAdapter() {
                            public void mouseClicked(MouseEvent evt) {
                                swingUtil.invokeAction("compareTable.mouseClicked", evt);
                            }
                        });
                    }
                }
                {
                    jPanel5 = new JPanel();
                    jPanel4.add(jPanel5, BorderLayout.NORTH);
                    jPanel5.setPreferredSize(new java.awt.Dimension(713, 42));
                    {
                        openExternalSrcFolder = new JButton();
                        jPanel5.add(openExternalSrcFolder);
                        openExternalSrcFolder.setText("open external src folder");
                        openExternalSrcFolder.setPreferredSize(new java.awt.Dimension(280, 29));
                        openExternalSrcFolder.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent evt) {
                                swingUtil.invokeAction("openExternalSrcFolder.actionPerformed", evt);
                            }
                        });
                    }
                    {
                        startCompareMatch = new JButton();
                        jPanel5.add(startCompareMatch);
                        startCompareMatch.setText("start compare source");
                        startCompareMatch.setPreferredSize(new java.awt.Dimension(280, 29));
                        startCompareMatch.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent evt) {
                                swingUtil.invokeAction("startCompareMatch.actionPerformed", evt);
                            }
                        });
                    }
                }
            }
            {
                jPanel6 = new JPanel();
                GroupLayout jPanel6Layout = new GroupLayout((JComponent) jPanel6);
                jPanel6.setLayout(jPanel6Layout);
                jTabbedPane1.addTab("configuration", null, jPanel6, null);
                {
                    DefaultComboBoxModel exportModeComboModel = new DefaultComboBoxModel();
                    for (ParseMode mode : ParseMode.values()) {
                        exportModeComboModel.addElement(mode);
                    }
                    exportModeCombo = new JComboBox();
                    exportModeCombo.setModel(exportModeComboModel);
                }
                jPanel6Layout.setHorizontalGroup(jPanel6Layout
                        .createSequentialGroup().addContainerGap(41, 41).addComponent(exportModeCombo,
                                GroupLayout.PREFERRED_SIZE, 167, GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(505, Short.MAX_VALUE));
                jPanel6Layout
                        .setVerticalGroup(jPanel6Layout.createSequentialGroup().addContainerGap(30, 30)
                                .addComponent(exportModeCombo, GroupLayout.PREFERRED_SIZE,
                                        GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
                                .addContainerGap(321, Short.MAX_VALUE));
            }
            {
                jPanel7 = new JPanel();
                BorderLayout jPanel7Layout = new BorderLayout();
                jPanel7.setLayout(jPanel7Layout);
                jTabbedPane1.addTab("error log", null, jPanel7, null);
                {
                    jScrollPane5 = new JScrollPane();
                    jPanel7.add(jScrollPane5, BorderLayout.CENTER);
                    {
                        DefaultListModel errorLogListModel = new DefaultListModel();
                        errorLogList = new JList();
                        jScrollPane5.setViewportView(errorLogList);
                        errorLogList.setModel(errorLogListModel);
                    }
                }
            }
        }
        this.setSize(734, 442);

        swingUtil.addAction("openExternalSrcFolder.actionPerformed", new Action() {
            public void action(EventObject evt) throws Exception {
                File dir = JFileChooserUtil.newInstance().selectDirectoryOnly().showOpenDialog()
                        .getApproveSelectedFile();
                if (dir == null) {
                    JOptionPaneUtil.newInstance().iconErrorMessage().showMessageDialog("file is not correct!",
                            "ERROR");
                    return;
                }
                externalDir = dir;
            }
        });
        swingUtil.addAction("startCompareMatch.actionPerformed", new Action() {

            public void action(EventObject evt) throws Exception {
                Validate.notNull(manualBaseDir, "source folder not set!!");
                Validate.notNull(externalDir, "external folder not set!!");
                Validate.isTrue(!manualBaseDir.equals(externalDir), "source dir : " + manualBaseDir
                        + "\nexternal dir : " + externalDir + "\n cant be the same!!");

                List<File> externalSrcFolderList = new ArrayList<File>();
                FileUtil.searchFileMatchs(externalDir, ".*", externalSrcFolderList);
                System.out.println("externalSrcFolderList = " + externalSrcFolderList.size());

                List<File> manualBaseSourceList = new ArrayList<File>();
                FileUtil.searchFileMatchs(manualBaseDir, ".*", manualBaseSourceList);
                System.out.println("manualBaseSourceList = " + manualBaseSourceList.size());

                String cutExternalPath = FileUtil.exportReceiveBaseDir(externalSrcFolderList).getAbsolutePath();
                System.out.println("cutExternalPath = " + cutExternalPath);
                int cutExternalLength = cutExternalPath.length();

                List<CompareFile> _compareList = new ArrayList<CompareFile>();
                CompareFile compare = null;
                File mostCloseFile = null;
                List<File> searchMatchSrcList = new ArrayList<File>();
                for (File external : externalSrcFolderList) {
                    compare = new CompareFile();
                    compare.external = external;

                    searchMatchSrcList.clear();
                    mostCloseFile = new File(manualBaseDir,
                            external.getAbsolutePath().substring(cutExternalLength));
                    System.out.println(mostCloseFile.exists() + " == close file : " + mostCloseFile);
                    if (mostCloseFile.exists()) {
                        searchMatchSrcList.add(mostCloseFile);
                    } else {
                        for (File src : manualBaseSourceList) {
                            if (src.getName().equalsIgnoreCase(external.getName())) {
                                searchMatchSrcList.add(src);
                            }
                        }
                    }

                    System.out.println(external.getName() + " => match source : " + searchMatchSrcList.size());
                    compare.srcSet = new HashSet<File>(searchMatchSrcList);
                    _compareList.add(compare);
                }
                compareList = _compareList;
                reloadCompareTable();
            }
        });
        swingUtil.addAction("compareTable.mouseClicked", new Action() {
            String tortoiseMergeFormat = "cmd /c call TortoiseMerge /base:\"%s\" /theirs:\"%s\"";
            String openFileFormat = "cmd /c call \"%s\"";

            void openFile(File file) {
                String command = String.format(openFileFormat, file);
                System.out.println(command);
                try {
                    ProcessWatcher.newInstance(Runtime.getRuntime().exec(command)).getStreamSync();
                    System.out.println("do reload...");
                    reloadCompareTable();
                } catch (IOException e1) {
                    JCommonUtil.handleException(e1);
                }
            }

            public void action(EventObject evt) throws Exception {
                MouseEvent event = (MouseEvent) evt;

                int rowPos = JTableUtil.newInstance(compareTable).getSelectedRow();
                final File external = (File) JTableUtil.newInstance(compareTable).getModel().getValueAt(rowPos,
                        CompareTableIndex.EXTERNAL_FILE.pos);
                final File srcFile = (File) JTableUtil.newInstance(compareTable).getModel().getValueAt(rowPos,
                        CompareTableIndex.SOURCE_FILE.pos);

                System.out.println("external : " + external);
                System.out.println("srcFile : " + srcFile);

                if (JMouseEventUtil.buttonLeftClick(2, event)) {
                    String command = String.format(tortoiseMergeFormat, external, srcFile);
                    System.out.println(command);
                    Runtime.getRuntime().exec(command);
                }
                if (JMouseEventUtil.buttonRightClick(1, event)) {
                    JMenuItem showInfoMenu = new JMenuItem();
                    showInfoMenu.setText("information");
                    showInfoMenu.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            JOptionPaneUtil.newInstance().iconInformationMessage().showMessageDialog(//
                                    "source file : \n" + srcFile + "\n"
                                            + DateFormatUtils.format(srcFile.lastModified(),
                                                    "yyyy/MM/dd HH:mm:ss")
                                            + "\n" + "size : " + srcFile.length() / 1024 + "\n\n"
                                            + "external file : \n" + external + "\n"
                                            + DateFormatUtils.format(external.lastModified(),
                                                    "yyyy/MM/dd HH:mm:ss")
                                            + "\n" + "size : " + external.length() / 1024,
                                    "INFORMATION");
                        }
                    });
                    JMenuItem openFileMenu = new JMenuItem();
                    openFileMenu.setText("OPEN : source");
                    openFileMenu.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            openFile(srcFile);
                        }
                    });
                    JMenuItem openExternalMenu = new JMenuItem();
                    openExternalMenu.setText("OPEN : external");
                    openExternalMenu.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            openFile(external);
                        }
                    });
                    JMenuItem openPairlMenu = new JMenuItem();
                    openPairlMenu.setText("OPEN : all");
                    openPairlMenu.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            openFile(srcFile);
                            openFile(external);
                        }
                    });

                    JPopupMenuUtil.newInstance(compareTable).applyEvent(event)
                            .addJMenuItem(showInfoMenu, openFileMenu, openExternalMenu, openPairlMenu).show();
                }
            }
        });
        swingUtil.addAction("loadSrcTextarea.actionPerformed", new Action() {
            public void action(EventObject evt) throws Exception {
                loadSrcTextarea();
            }
        });
        swingUtil.addAction("srcList.mouseClicked", new Action() {
            public void action(EventObject evt) throws Exception {
                if (JMouseEventUtil.buttonRightClick(1, evt)) {
                    JPopupMenuUtil.newInstance(srcList).applyEvent(evt)
                            .addJMenuItem("mark svn delete", new ActionListener() {
                                public void actionPerformed(ActionEvent e) {
                                    if (JOptionPaneUtil.ComfirmDialogResult.YES_OK_OPTION != JOptionPaneUtil
                                            .newInstance().confirmButtonYesNo().showConfirmDialog(
                                                    "are you sure, mark delete file : "
                                                            + srcList.getSelectedValues().length,
                                                    "SVN DELETE")) {
                                        return;
                                    }
                                    StringBuilder sb = new StringBuilder();
                                    Process process = null;
                                    InputStream in = null;
                                    for (Object obj : srcList.getSelectedValues()) {
                                        LineParser l = (LineParser) obj;
                                        String command = String.format("svn delete \"%s\"", l.file);
                                        System.out.println(command);
                                        try {
                                            process = Runtime.getRuntime().exec(command);
                                            in = process.getInputStream();
                                            for (; in.read() != -1;)
                                                ;
                                            if (l.file.exists()) {
                                                sb.append(l.file.getName() + "\n");
                                            }
                                        } catch (IOException e1) {
                                            e1.printStackTrace();
                                            sb.append(l.file.getName() + "\n");
                                        }
                                    }
                                    if (sb.length() > 0) {
                                        JOptionPaneUtil.newInstance().iconErrorMessage()
                                                .showMessageDialog("error : \n" + sb, "ERROR");
                                    } else {
                                        JOptionPaneUtil.newInstance().iconInformationMessage()
                                                .showMessageDialog("mark delete completed!!", "SUCCESS");
                                    }
                                    DefaultListModel model = (DefaultListModel) srcList.getModel();
                                    for (int ii = 0; ii < model.getSize(); ii++) {
                                        LineParser l = (LineParser) model.getElementAt(ii);
                                        if (!l.file.exists()) {
                                            model.remove(ii);
                                            ii--;
                                        }
                                    }
                                }
                            }).show();
                }

                if (!JListUtil.newInstance(srcList).isCorrectMouseClick(evt)) {
                    return;
                }
                LineParser lineParser = (LineParser) JListUtil.getLeadSelectionObject(srcList);
                if (lineParser == null) {
                    return;
                }
                Runtime.getRuntime().exec("cmd /c call \"" + lineParser.file + "\"");
            }
        });
        swingUtil.addAction("srcList.keyPressed", new Action() {
            public void action(EventObject evt) throws Exception {
                JListUtil.newInstance(srcList).defaultJListKeyPressed(evt);
            }
        });
        swingUtil.addAction("outPutList.mouseClicked", new Action() {
            public void action(EventObject evt) throws Exception {
                if (!JListUtil.newInstance(outPutList).isCorrectMouseClick(evt)) {
                    return;
                }
            }
        });
        swingUtil.addAction("outPutList.keyPressed", new Action() {
            public void action(EventObject evt) throws Exception {
                JListUtil.newInstance(outPutList).defaultJListKeyPressed(evt);
            }
        });
        swingUtil.addAction("outPutDir.actionPerformed", new Action() {
            public void action(EventObject evt) throws Exception {
                File dir = JFileChooserUtil.newInstance().selectDirectoryOnly().showOpenDialog()
                        .getApproveSelectedFile();
                if (dir == null) {
                    outputDir = DEFAULT_OUTPUT_DIR;
                } else {
                    outputDir = dir;
                }
                reflushOutputList();
            }
        });
        swingUtil.addAction("srcBaseDir.actionPerformed", new Action() {
            public void action(EventObject evt) throws Exception {
                File dir = JFileChooserUtil.newInstance().selectDirectoryOnly().showOpenDialog()
                        .getApproveSelectedFile();
                Validate.notNull(dir, "src base directory is not correct!");
                manualBaseDir = dir;
            }
        });
        swingUtil.addAction("execute.actionPerformed", new Action() {
            public void action(EventObject evt) throws Exception {
                DefaultListModel model = (DefaultListModel) outPutList.getModel();
                for (int ii = 0; ii < model.size(); ii++) {
                    OutputFile file = (OutputFile) model.getElementAt(ii);
                    if (!file.destFile.getParentFile().exists()) {
                        file.destFile.getParentFile().mkdirs();
                    }
                    FileUtil.copyFile(file.srcFile, file.destFile);
                }
                JOptionPaneUtil.newInstance().iconInformationMessage()
                        .showMessageDialog("copy success!!\nsize = " + model.getSize(), getTitle());
            }
        });
    } catch (Exception e) {
        e.printStackTrace();
    }
}

From source file:eu.dety.burp.joseph.attacks.bleichenbacher_pkcs1.gui.BleichenbacherPkcs1DecryptionAttackPanel.java

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

    cekFormatButtonGroup = new javax.swing.ButtonGroup();
    startAttackButton = new javax.swing.JButton();
    cancelAttackButton = new javax.swing.JButton();
    jSeparator1 = new javax.swing.JSeparator();
    timeElapsedLabel = new javax.swing.JLabel();
    amountRequestsLabel = new javax.swing.JLabel();
    currentSLabel = new javax.swing.JLabel();
    resultKeyLabel = new javax.swing.JLabel();
    cekFormatHex = new javax.swing.JRadioButton();
    cekFormatB64 = new javax.swing.JRadioButton();
    attackDescription = new javax.swing.JLabel();
    timeElapsedValue = new javax.swing.JLabel();
    amountRequestsValue = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    currentSValue = new javax.swing.JTextArea();
    jScrollPane2 = new javax.swing.JScrollPane();
    resultContentValue = new javax.swing.JTextArea();
    resultContentLabel = new javax.swing.JLabel();
    jScrollPane3 = new javax.swing.JScrollPane();
    resultKeyValue = new javax.swing.JTextArea();

    java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("JOSEPH"); // NOI18N
    startAttackButton.setText(bundle.getString("STARTATTACKBUTTON")); // NOI18N
    startAttackButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            startAttackButtonActionPerformed(evt);
        }
    });

    cancelAttackButton.setText(bundle.getString("CANCELATTACKBUTTON")); // NOI18N
    cancelAttackButton.setEnabled(false);
    cancelAttackButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cancelAttackButtonActionPerformed(evt);
        }
    });

    timeElapsedLabel.setText(bundle.getString("TIME_ELAPSED")); // NOI18N

    amountRequestsLabel.setText(bundle.getString("AMOUNT_REQUESTS")); // NOI18N

    currentSLabel.setText(bundle.getString("FOUND_S")); // NOI18N

    resultKeyLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
    resultKeyLabel.setText(bundle.getString("RESULT_CEK")); // NOI18N

    cekFormatButtonGroup.add(cekFormatHex);
    cekFormatHex.setSelected(true);
    cekFormatHex.setText(bundle.getString("HEX")); // NOI18N
    cekFormatHex.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cekFormatHexActionPerformed(evt);
        }
    });

    cekFormatButtonGroup.add(cekFormatB64);
    cekFormatB64.setText(bundle.getString("BASE64URL")); // NOI18N
    cekFormatB64.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cekFormatB64ActionPerformed(evt);
        }
    });

    attackDescription.setText(
            "<html><em>Note: This attack will take several minutes and performs thousands of requests to the server!</em><br />This attack is only successful, if the valid oracle responses are correctly marked.</html>");

    timeElapsedValue.setText("00:00:00");
    timeElapsedValue.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);

    amountRequestsValue.setText("0");
    amountRequestsValue.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);

    jScrollPane1.setBackground(new java.awt.Color(251, 251, 251));
    jScrollPane1.setBorder(null);
    jScrollPane1.setForeground(new java.awt.Color(0, 0, 0));

    currentSValue.setEditable(false);
    currentSValue.setBackground(new java.awt.Color(251, 251, 251));
    currentSValue.setColumns(20);
    currentSValue.setForeground(new java.awt.Color(0, 0, 0));
    currentSValue.setLineWrap(true);
    currentSValue.setRows(4);
    currentSValue.setTabSize(4);
    currentSValue.setText("0");
    currentSValue.setWrapStyleWord(true);
    currentSValue.setBorder(null);
    jScrollPane1.setViewportView(currentSValue);

    jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

    resultContentValue.setEditable(false);
    resultContentValue.setColumns(20);
    resultContentValue.setLineWrap(true);
    resultContentValue.setRows(5);
    resultContentValue.setWrapStyleWord(true);
    resultContentValue.setBorder(null);
    jScrollPane2.setViewportView(resultContentValue);

    resultContentLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
    resultContentLabel.setText(bundle.getString("RESULT_CONTENT")); // NOI18N

    jScrollPane3.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

    resultKeyValue.setEditable(false);
    resultKeyValue.setColumns(20);
    resultKeyValue.setLineWrap(true);
    resultKeyValue.setRows(5);
    resultKeyValue.setWrapStyleWord(true);
    resultKeyValue.setBorder(null);
    jScrollPane3.setViewportView(resultKeyValue);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.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().addGroup(layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(attackDescription, javax.swing.GroupLayout.Alignment.TRAILING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, 922, Short.MAX_VALUE)
                            .addComponent(jSeparator1)
                            .addGroup(layout.createSequentialGroup().addGroup(layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup().addComponent(startAttackButton)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(cancelAttackButton))
                                    .addGroup(layout.createSequentialGroup().addComponent(cekFormatHex)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(cekFormatB64))
                                    .addComponent(resultKeyLabel)
                                    .addGroup(layout.createSequentialGroup().addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                    false)
                                            .addComponent(currentSLabel,
                                                    javax.swing.GroupLayout.Alignment.LEADING,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(amountRequestsLabel,
                                                    javax.swing.GroupLayout.Alignment.LEADING,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(timeElapsedLabel,
                                                    javax.swing.GroupLayout.Alignment.LEADING,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                            .addPreferredGap(
                                                    javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addGroup(layout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.TRAILING, false)
                                                    .addComponent(timeElapsedValue,
                                                            javax.swing.GroupLayout.Alignment.LEADING,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE, 576,
                                                            Short.MAX_VALUE)
                                                    .addComponent(amountRequestsValue,
                                                            javax.swing.GroupLayout.Alignment.LEADING,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            Short.MAX_VALUE)
                                                    .addComponent(jScrollPane1,
                                                            javax.swing.GroupLayout.Alignment.LEADING)))
                                    .addComponent(resultContentLabel)).addGap(0, 0, Short.MAX_VALUE)))
                            .addContainerGap())
                    .addGroup(layout.createSequentialGroup().addGap(6, 6, 6)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 700,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 700,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))));
    layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addContainerGap()
                            .addComponent(attackDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 52,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(startAttackButton).addComponent(cancelAttackButton))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .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(timeElapsedLabel).addComponent(timeElapsedValue))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(amountRequestsLabel).addComponent(amountRequestsValue))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(currentSLabel).addComponent(jScrollPane1,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 82,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(resultKeyLabel)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(cekFormatHex).addComponent(cekFormatB64))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 110,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(resultContentLabel)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 110,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(68, Short.MAX_VALUE)));
}

From source file:com.juanhg.fridge.FridgeApplet.java

private void autogeneratedCode() {
    JPanel panel_control = new JPanel();
    panel_control.setBorder(new CompoundBorder(new EtchedBorder(EtchedBorder.RAISED, null, null),
            new BevelBorder(BevelBorder.RAISED, null, null, null, null)));

    JPanel panelInputs = new JPanel();
    panelInputs.setToolTipText("");
    panelInputs.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));

    JPanel panelOutputs = new JPanel();
    panelOutputs.setToolTipText("");
    panelOutputs.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));

    JPanel panelTitleOutputs = new JPanel();
    panelTitleOutputs.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));

    JLabel labelOutputData = new JLabel("Datos de la Simulaci\u00F3n");
    labelOutputData.setFont(new Font("Tahoma", Font.PLAIN, 14));
    panelTitleOutputs.add(labelOutputData);

    lblO1 = new JLabel("Tiempo On:");
    lblO1.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblTValue = new JLabel();
    lblTValue.setText("0");
    lblTValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    JLabel lblO2 = new JLabel("Eficiencia:");
    lblO2.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblEValue = new JLabel();
    lblEValue.setText("0");
    lblEValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    JLabel lblTiempoOff = new JLabel("Tiempo Off:");
    lblTiempoOff.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblOffValue = new JLabel();
    lblOffValue.setText("0");
    lblOffValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    GroupLayout gl_panelOutputs = new GroupLayout(panelOutputs);
    gl_panelOutputs.setHorizontalGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
            .addComponent(panelTitleOutputs, GroupLayout.DEFAULT_SIZE, 351, Short.MAX_VALUE)
            .addGroup(gl_panelOutputs.createSequentialGroup().addGap(22)
                    .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                            .addComponent(lblO2, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblO1, GroupLayout.PREFERRED_SIZE, 77, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                            .addComponent(lblEValue, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE)
                            .addGroup(gl_panelOutputs.createSequentialGroup()
                                    .addComponent(lblTValue, GroupLayout.PREFERRED_SIZE, 52,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addGap(31)
                                    .addComponent(lblTiempoOff, GroupLayout.PREFERRED_SIZE, 77,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(ComponentPlacement.UNRELATED)
                                    .addComponent(lblOffValue, GroupLayout.DEFAULT_SIZE, 62, Short.MAX_VALUE)))
                    .addContainerGap()));
    gl_panelOutputs/*  w w w. j a  v a2s  .c o  m*/
            .setVerticalGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                    .addGroup(gl_panelOutputs.createSequentialGroup()
                            .addComponent(panelTitleOutputs, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(ComponentPlacement.UNRELATED)
                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                                    .addComponent(lblOffValue, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblTiempoOff, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addGroup(gl_panelOutputs.createSequentialGroup()
                                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.BASELINE)
                                                    .addComponent(lblO1).addComponent(lblTValue))
                                            .addPreferredGap(ComponentPlacement.RELATED)
                                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.BASELINE)
                                                    .addComponent(lblO2, GroupLayout.PREFERRED_SIZE, 17,
                                                            GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(lblEValue, GroupLayout.PREFERRED_SIZE, 17,
                                                            GroupLayout.PREFERRED_SIZE))))));
    panelOutputs.setLayout(gl_panelOutputs);

    JPanel panelLicense = new JPanel();
    panelLicense.setBorder(new LineBorder(new Color(0, 0, 0)));

    JPanel panel_6 = new JPanel();
    panel_6.setBorder(new LineBorder(new Color(0, 0, 0)));
    GroupLayout gl_panel_control = new GroupLayout(panel_control);
    gl_panel_control
            .setHorizontalGroup(gl_panel_control.createParallelGroup(Alignment.TRAILING)
                    .addGroup(Alignment.LEADING, gl_panel_control.createSequentialGroup().addContainerGap()
                            .addGroup(gl_panel_control.createParallelGroup(Alignment.LEADING)
                                    .addComponent(panelOutputs, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(panelInputs, GroupLayout.PREFERRED_SIZE, 346, Short.MAX_VALUE)
                                    .addComponent(panel_6, Alignment.TRAILING, GroupLayout.PREFERRED_SIZE, 346,
                                            Short.MAX_VALUE)
                                    .addComponent(panelLicense, GroupLayout.DEFAULT_SIZE, 346, Short.MAX_VALUE))
                            .addContainerGap()));
    gl_panel_control.setVerticalGroup(gl_panel_control.createParallelGroup(Alignment.TRAILING)
            .addGroup(gl_panel_control.createSequentialGroup().addContainerGap()
                    .addComponent(panelInputs, GroupLayout.PREFERRED_SIZE, 305, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(panelOutputs, GroupLayout.PREFERRED_SIZE, 100, Short.MAX_VALUE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(panel_6, GroupLayout.PREFERRED_SIZE, 76, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(panelLicense,
                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                    .addGap(24)));

    btnLaunchSimulation = new JButton("Iniciar");
    btnLaunchSimulation.setFont(new Font("Tahoma", Font.PLAIN, 16));
    btnLaunchSimulation.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            btnLaunchSimulationEvent(event);
        }
    });
    GroupLayout gl_panel_6 = new GroupLayout(panel_6);
    gl_panel_6.setHorizontalGroup(gl_panel_6.createParallelGroup(Alignment.LEADING).addGroup(Alignment.TRAILING,
            gl_panel_6.createSequentialGroup().addContainerGap()
                    .addComponent(btnLaunchSimulation, GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE)
                    .addContainerGap()));
    gl_panel_6.setVerticalGroup(gl_panel_6.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panel_6
                    .createSequentialGroup().addContainerGap().addComponent(btnLaunchSimulation,
                            GroupLayout.PREFERRED_SIZE, 55, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(69, Short.MAX_VALUE)));
    panel_6.setLayout(gl_panel_6);

    JLabel lblNewLabel = new JLabel("GNU GENERAL PUBLIC LICENSE");
    panelLicense.add(lblNewLabel);

    JLabel LabelI1 = new JLabel("Potencia");
    LabelI1.setFont(new Font("Tahoma", Font.PLAIN, 14));

    JLabel labelI2 = new JLabel("T1");
    labelI2.setFont(new Font("Tahoma", Font.PLAIN, 14));

    JLabel labelI3 = new JLabel("T2");
    labelI3.setFont(new Font("Tahoma", Font.PLAIN, 14));

    JPanel panelTitle = new JPanel();
    panelTitle.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));

    lblT1Value = new JLabel("20");
    lblT1Value.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblT2Value = new JLabel("-15");
    lblT2Value.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblPValue = new JLabel("700");
    lblPValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    sliderP = new JSlider();
    sliderP.setMinimum(500);
    sliderP.setMaximum(1000);
    sliderP.setMinorTickSpacing(50);
    sliderP.setValue(700);
    sliderP.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent event) {
            sliderI1Event();
        }
    });

    sliderT1 = new JSlider();
    sliderT1.setMinimum(18);
    sliderT1.setMaximum(30);
    sliderT1.setMinorTickSpacing(1);
    sliderT1.setValue(20);
    sliderT1.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            sliderI2Event();
        }
    });

    sliderT2 = new JSlider();
    sliderT2.setMinimum(10);
    sliderT2.setMaximum(30);
    sliderT2.setValue(15);
    sliderT2.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            sliderI3Event();
        }
    });

    JLabel lblQo = new JLabel("Qo");
    lblQo.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblQcValue = new JLabel("25");
    lblQcValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    sliderQc = new JSlider();
    sliderQc.setMinimum(10);
    sliderQc.setMaximum(50);
    sliderQc.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent arg0) {
            sliderI4Event();
        }
    });
    sliderQc.setValue(25);
    sliderQc.setMinorTickSpacing(1);

    btn1 = new JButton("1");
    btn1.setFont(new Font("Tahoma", Font.PLAIN, 21));
    btn1.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
            btnMilk.setEnabled(false);
            btnFish.setEnabled(false);
            btnMetal.setEnabled(false);
            btn1.setEnabled(false);
            btn2.setEnabled(true);
            sliderQc.setEnabled(true);
            lblQcValue.setText("" + sliderQc.getValue());

        }
    });

    btn2 = new JButton("2");
    btn2.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            btnMilk.setEnabled(true);
            btnFish.setEnabled(true);
            btnMetal.setEnabled(true);
            btn1.setEnabled(true);
            btn2.setEnabled(false);
            phase = 2;
            sliderQc.setEnabled(false);
            lblQcValue.setText("-");

        }
    });
    btn2.setFont(new Font("Tahoma", Font.PLAIN, 21));

    fishImage = loadImage(fish);
    btnFish = new JButton(new ImageIcon(fishImage));
    btnFish.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
            btnFishFunction();
        }
    });

    milkImage = loadImage(milk);
    btnMilk = new JButton(new ImageIcon(milkImage));
    btnMilk.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            btnMilkFunction();
        }
    });

    metalImage = loadImage(metal);
    btnMetal = new JButton(new ImageIcon(metalImage));
    btnMetal.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            btnMetalFunction();
        }
    });

    GroupLayout gl_panelInputs = new GroupLayout(panelInputs);
    gl_panelInputs
            .setHorizontalGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                    .addComponent(panelTitle, GroupLayout.DEFAULT_SIZE, 344, Short.MAX_VALUE)
                    .addGroup(gl_panelInputs.createSequentialGroup().addGap(38).addGroup(gl_panelInputs
                            .createParallelGroup(Alignment.LEADING).addGroup(
                                    gl_panelInputs.createSequentialGroup().addGap(36)
                                            .addComponent(btn1, GroupLayout.PREFERRED_SIZE, 80,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(ComponentPlacement.UNRELATED)
                                            .addComponent(btn2, GroupLayout.PREFERRED_SIZE, 80,
                                                    GroupLayout.PREFERRED_SIZE))
                            .addGroup(gl_panelInputs.createSequentialGroup().addGroup(gl_panelInputs
                                    .createParallelGroup(Alignment.LEADING, false)
                                    .addComponent(lblQo, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelI3, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                            Short.MAX_VALUE)
                                    .addComponent(labelI2, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                            Short.MAX_VALUE)
                                    .addComponent(LabelI1, GroupLayout.DEFAULT_SIZE, 66, Short.MAX_VALUE))
                                    .addGap(18)
                                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING, false)
                                            .addGroup(gl_panelInputs.createSequentialGroup()
                                                    .addGroup(gl_panelInputs
                                                            .createParallelGroup(Alignment.LEADING)
                                                            .addComponent(lblPValue, GroupLayout.PREFERRED_SIZE,
                                                                    42, GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(lblT1Value,
                                                                    GroupLayout.PREFERRED_SIZE, 56,
                                                                    GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(lblT2Value,
                                                                    GroupLayout.PREFERRED_SIZE, 56,
                                                                    GroupLayout.PREFERRED_SIZE))
                                                    .addGap(18)
                                                    .addGroup(gl_panelInputs
                                                            .createParallelGroup(Alignment.LEADING, false)
                                                            .addComponent(sliderT1, 0, 0, Short.MAX_VALUE)
                                                            .addComponent(sliderP, GroupLayout.DEFAULT_SIZE,
                                                                    134, Short.MAX_VALUE)
                                                            .addComponent(sliderT2, 0, 0, Short.MAX_VALUE)))
                                            .addGroup(gl_panelInputs.createSequentialGroup()
                                                    .addComponent(lblQcValue, GroupLayout.PREFERRED_SIZE, 56,
                                                            GroupLayout.PREFERRED_SIZE)
                                                    .addGap(18)
                                                    .addComponent(sliderQc, 0, 0, Short.MAX_VALUE)))))
                            .addContainerGap(14, Short.MAX_VALUE))
                    .addGroup(Alignment.TRAILING, gl_panelInputs.createSequentialGroup()
                            .addContainerGap(28, Short.MAX_VALUE)
                            .addComponent(btnFish, GroupLayout.PREFERRED_SIZE, 93, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(ComponentPlacement.RELATED)
                            .addComponent(btnMilk, GroupLayout.PREFERRED_SIZE, 93, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(ComponentPlacement.RELATED)
                            .addComponent(btnMetal, GroupLayout.PREFERRED_SIZE, 93, GroupLayout.PREFERRED_SIZE)
                            .addGap(25)));
    gl_panelInputs.setVerticalGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panelInputs.createSequentialGroup()
                    .addComponent(panelTitle, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addGap(18)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(LabelI1).addComponent(lblPValue, GroupLayout.PREFERRED_SIZE,
                                            17, GroupLayout.PREFERRED_SIZE))
                            .addComponent(sliderP, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(labelI2).addComponent(lblT1Value, GroupLayout.PREFERRED_SIZE,
                                            17, GroupLayout.PREFERRED_SIZE))
                            .addComponent(sliderT1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addGap(11)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING).addComponent(labelI3)
                            .addComponent(lblT2Value, GroupLayout.PREFERRED_SIZE, 17,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(sliderT2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(lblQo, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblQcValue, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE))
                            .addComponent(sliderQc, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addGap(18)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addComponent(btn1, GroupLayout.PREFERRED_SIZE, 49, GroupLayout.PREFERRED_SIZE)
                            .addComponent(btn2, GroupLayout.PREFERRED_SIZE, 49, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING, false)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                                    .addComponent(btnMetal, GroupLayout.PREFERRED_SIZE, 72,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(btnMilk, GroupLayout.PREFERRED_SIZE, 72,
                                            GroupLayout.PREFERRED_SIZE))
                            .addGroup(gl_panelInputs.createSequentialGroup().addGap(1).addComponent(btnFish,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addContainerGap(12, Short.MAX_VALUE)));

    JLabel lblDatosDeEntrada = new JLabel("Datos de Entrada");
    lblDatosDeEntrada.setFont(new Font("Tahoma", Font.PLAIN, 14));
    panelTitle.add(lblDatosDeEntrada);
    panelInputs.setLayout(gl_panelInputs);
    panel_control.setLayout(gl_panel_control);

    JPanel panel_visualizar = new JPanel();
    panel_visualizar.setBackground(Color.WHITE);

    GroupLayout groupLayout = new GroupLayout(getContentPane());
    groupLayout.setHorizontalGroup(groupLayout.createParallelGroup(Alignment.LEADING)
            .addGroup(groupLayout.createSequentialGroup().addContainerGap()
                    .addComponent(panel_control, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(panel_visualizar, GroupLayout.PREFERRED_SIZE, 398, GroupLayout.PREFERRED_SIZE)
                    .addGap(452)));
    groupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.TRAILING).addGroup(groupLayout
            .createSequentialGroup()
            .addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
                    .addGroup(Alignment.LEADING,
                            groupLayout.createSequentialGroup().addGap(12).addComponent(panel_visualizar,
                                    GroupLayout.DEFAULT_SIZE, 567, Short.MAX_VALUE))
                    .addGroup(groupLayout.createSequentialGroup().addContainerGap().addComponent(panel_control,
                            GroupLayout.PREFERRED_SIZE, 568, GroupLayout.PREFERRED_SIZE)))
            .addContainerGap()));

    JPanel panel = new JPanel();

    panelGrafica = new JPanelGrafica();
    GroupLayout gl_panel = new GroupLayout(panel);
    gl_panel.setHorizontalGroup(gl_panel.createParallelGroup(Alignment.LEADING).addGap(0, 384, Short.MAX_VALUE)
            .addComponent(panelGrafica, GroupLayout.DEFAULT_SIZE, 384, Short.MAX_VALUE));
    gl_panel.setVerticalGroup(gl_panel.createParallelGroup(Alignment.LEADING).addGap(0, 241, Short.MAX_VALUE)
            .addComponent(panelGrafica, GroupLayout.DEFAULT_SIZE, 241, Short.MAX_VALUE));
    panel.setLayout(gl_panel);
    GroupLayout gl_panel_visualizar = new GroupLayout(panel_visualizar);
    gl_panel_visualizar.setHorizontalGroup(gl_panel_visualizar.createParallelGroup(Alignment.LEADING)
            .addComponent(panel, GroupLayout.DEFAULT_SIZE, 398, Short.MAX_VALUE));
    gl_panel_visualizar.setVerticalGroup(gl_panel_visualizar.createParallelGroup(Alignment.LEADING)
            .addComponent(panel, GroupLayout.DEFAULT_SIZE, 567, Short.MAX_VALUE));

    panel_visualizar.setLayout(gl_panel_visualizar);

    getContentPane().setLayout(groupLayout);
}