Example usage for javax.swing GroupLayout DEFAULT_SIZE

List of usage examples for javax.swing GroupLayout DEFAULT_SIZE

Introduction

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

Prototype

int DEFAULT_SIZE

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

Click Source Link

Document

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

Usage

From source file:eu.ggnet.dwoss.stock.CommissioningManagerView.java

/** This method is called from within the constructor to
 * initialize the form.//from w  w  w  .  jav  a 2  s.co 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() {

    unitIdLabel = new javax.swing.JLabel();
    unitIdTextField = new javax.swing.JTextField();
    jScrollPane1 = new javax.swing.JScrollPane();
    unitsList = new javax.swing.JList();
    jScrollPane2 = new javax.swing.JScrollPane();
    transactionList = new javax.swing.JList();
    cancelButton = new javax.swing.JButton();
    done2Button = new javax.swing.JButton();
    detailButton = new javax.swing.JButton();
    failButton = new javax.swing.JButton();
    done1Button = new javax.swing.JButton();
    confirmButton = new javax.swing.JButton();
    jScrollPane4 = new javax.swing.JScrollPane();
    statusTextPane = new javax.swing.JTextPane();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Kommissionsmanager");

    unitIdLabel.setText("UnitId:");

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

    jScrollPane1.setViewportView(unitsList);

    jScrollPane2.setViewportView(transactionList);

    cancelButton.setText("Abbrechen");
    cancelButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cancelButtonActionPerformed(evt);
        }
    });

    done2Button.setText("Authentifiziere User 2");
    done2Button.setEnabled(false);
    done2Button.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            done2ButtonActionPerformed(evt);
        }
    });

    detailButton.setText("Details");
    detailButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            detailButtonActionPerformed(evt);
        }
    });

    failButton.setText("Fail Transaktion");
    failButton.setEnabled(false);

    done1Button.setText("Authentifiziere User 1");
    done1Button.setEnabled(false);
    done1Button.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            done1ButtonActionPerformed(evt);
        }
    });

    confirmButton.setFont(confirmButton.getFont());
    confirmButton.setText("Statusnderung durchfhren");
    confirmButton.setEnabled(false);
    confirmButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            confirmButtonActionPerformed(evt);
        }
    });

    statusTextPane.setContentType("text/html"); // NOI18N
    jScrollPane4.setViewportView(statusTextPane);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
                            layout.createSequentialGroup().addComponent(unitIdLabel)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(unitIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 162,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jScrollPane4)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 243,
                                    Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(failButton, javax.swing.GroupLayout.PREFERRED_SIZE, 119,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                    false)
                                            .addComponent(detailButton,
                                                    javax.swing.GroupLayout.Alignment.TRAILING,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(cancelButton,
                                                    javax.swing.GroupLayout.Alignment.TRAILING,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                            .addComponent(done2Button, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(confirmButton, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(done1Button, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addGap(15, 15, 15)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 154,
                                    Short.MAX_VALUE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(detailButton).addComponent(failButton))
                            .addGap(31, 31, 31)
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 124,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(done1Button)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(done2Button, javax.swing.GroupLayout.PREFERRED_SIZE, 29,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(confirmButton)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(cancelButton))
                    .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(unitIdLabel).addComponent(unitIdTextField,
                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(
                                    jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 479, Short.MAX_VALUE)))
                    .addContainerGap()));

    pack();
}

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

private void initGUI() {
    try {/*from ww  w.  j a v  a2s  . c  o m*/
        {
        }
        BorderLayout thisLayout = new BorderLayout();
        getContentPane().setLayout(thisLayout);
        this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        {
            jTabbedPane1 = new JTabbedPane();
            getContentPane().add(jTabbedPane1, BorderLayout.CENTER);
            {
                jPanel1 = new JPanel();
                BorderLayout jPanel1Layout = new BorderLayout();
                jPanel1.setLayout(jPanel1Layout);
                jTabbedPane1.addTab("source", null, jPanel1, null);
                {
                    jScrollPane1 = new JScrollPane();
                    jPanel1.add(jScrollPane1, BorderLayout.CENTER);
                    {
                        replaceArea = new JTextArea();
                        jScrollPane1.setViewportView(replaceArea);
                        replaceArea.addMouseListener(new MouseAdapter() {
                            public void mouseClicked(MouseEvent evt) {
                                JPopupMenuUtil.newInstance(replaceArea).applyEvent(evt)
                                        .addJMenuItem("load from file", true, new ActionListener() {

                                            Thread newThread;

                                            public void actionPerformed(ActionEvent arg0) {
                                                if (newThread != null
                                                        && newThread.getState() != Thread.State.TERMINATED) {
                                                    JCommonUtil._jOptionPane_showMessageDialog_error(
                                                            "file is loading!");
                                                    return;
                                                }

                                                final File file = JCommonUtil._jFileChooser_selectFileOnly();
                                                if (file == null) {
                                                    JCommonUtil._jOptionPane_showMessageDialog_error(
                                                            "file is not correct!");
                                                    return;
                                                }
                                                String defaultCharset = Charset.defaultCharset().displayName();
                                                String chst = (String) JCommonUtil._jOptionPane_showInputDialog(
                                                        "input your charset!", defaultCharset);
                                                final Charset charset2 = Charset.forName(
                                                        StringUtils.defaultIfEmpty(chst, defaultCharset));

                                                newThread = new Thread(Thread.currentThread().getThreadGroup(),
                                                        new Runnable() {
                                                            public void run() {
                                                                try {
                                                                    loadFromFileSb = new StringBuilder();
                                                                    BufferedReader reader = new BufferedReader(
                                                                            new InputStreamReader(
                                                                                    new FileInputStream(file),
                                                                                    charset2));
                                                                    for (String line = null; (line = reader
                                                                            .readLine()) != null;) {
                                                                        loadFromFileSb.append(line + "\n");
                                                                    }
                                                                    reader.close();
                                                                    replaceArea
                                                                            .setText(loadFromFileSb.toString());
                                                                    JCommonUtil
                                                                            ._jOptionPane_showMessageDialog_info(
                                                                                    "load completed!");
                                                                } catch (Exception e) {
                                                                    JCommonUtil.handleException(e);
                                                                }
                                                            }
                                                        }, "" + System.currentTimeMillis());
                                                newThread.setDaemon(true);
                                                newThread.start();
                                            }
                                        }).show();
                            }
                        });
                    }
                }
            }
            {
                jPanel2 = new JPanel();
                BorderLayout jPanel2Layout = new BorderLayout();
                jPanel2.setLayout(jPanel2Layout);
                jTabbedPane1.addTab("param", null, jPanel2, null);
                {
                    exeucte = new JButton();
                    jPanel2.add(exeucte, BorderLayout.SOUTH);
                    exeucte.setText("exeucte");
                    exeucte.setPreferredSize(new java.awt.Dimension(491, 125));
                    exeucte.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            exeucteActionPerformed(evt);
                        }
                    });
                }
                {
                    jPanel3 = new JPanel();
                    GroupLayout jPanel3Layout = new GroupLayout((JComponent) jPanel3);
                    jPanel3.setLayout(jPanel3Layout);
                    jPanel2.add(jPanel3, BorderLayout.CENTER);
                    {
                        repFromText = new JTextField();
                    }
                    {
                        repToText = new JTextField();
                    }
                    jPanel3Layout.setHorizontalGroup(jPanel3Layout.createSequentialGroup()
                            .addContainerGap(25, 25)
                            .addGroup(jPanel3Layout.createParallelGroup()
                                    .addGroup(jPanel3Layout.createSequentialGroup().addComponent(repFromText,
                                            GroupLayout.PREFERRED_SIZE, 446, GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel3Layout.createSequentialGroup().addComponent(repToText,
                                            GroupLayout.PREFERRED_SIZE, 446, GroupLayout.PREFERRED_SIZE)))
                            .addContainerGap(20, Short.MAX_VALUE));
                    jPanel3Layout.setVerticalGroup(jPanel3Layout.createSequentialGroup().addContainerGap()
                            .addComponent(repFromText, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(repToText, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
                }
                {
                    addToTemplate = new JButton();
                    jPanel2.add(addToTemplate, BorderLayout.NORTH);
                    addToTemplate.setText("add to template");
                    addToTemplate.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            prop.put(repFromText.getText(), repToText.getText());
                            reloadTemplateList();
                        }
                    });
                }
            }
            {
                jPanel4 = new JPanel();
                BorderLayout jPanel4Layout = new BorderLayout();
                jPanel4.setLayout(jPanel4Layout);
                jTabbedPane1.addTab("result", null, jPanel4, null);
                {
                    jScrollPane2 = new JScrollPane();
                    jPanel4.add(jScrollPane2, BorderLayout.CENTER);
                    jScrollPane2.setPreferredSize(new java.awt.Dimension(491, 283));
                    {
                        DefaultTableModel resultAreaModel = JTableUtil.createModel(true, "match", "count");
                        resultArea = new JTable();
                        jScrollPane2.setViewportView(resultArea);
                        JTableUtil.defaultSetting(resultArea);
                        resultArea.setModel(resultAreaModel);
                    }
                }
            }
            {
                jPanel5 = new JPanel();
                BorderLayout jPanel5Layout = new BorderLayout();
                jPanel5.setLayout(jPanel5Layout);
                jTabbedPane1.addTab("template", null, jPanel5, null);
                {
                    jScrollPane3 = new JScrollPane();
                    jPanel5.add(jScrollPane3, BorderLayout.CENTER);
                    {
                        templateList = new JList();
                        jScrollPane3.setViewportView(templateList);
                        reloadTemplateList();
                    }
                    templateList.addMouseListener(new MouseAdapter() {
                        public void mouseClicked(MouseEvent evt) {
                            if (templateList.getLeadSelectionIndex() == -1) {
                                return;
                            }
                            Entry<Object, Object> entry = (Entry<Object, Object>) JListUtil
                                    .getLeadSelectionObject(templateList);
                            repFromText.setText((String) entry.getKey());
                            repToText.setText((String) entry.getValue());
                        }
                    });
                    templateList.addKeyListener(new KeyAdapter() {
                        public void keyPressed(KeyEvent evt) {
                            JListUtil.newInstance(templateList).defaultJListKeyPressed(evt);
                        }
                    });
                }
            }
            {
                jPanel6 = new JPanel();
                FlowLayout jPanel6Layout = new FlowLayout();
                jPanel6.setLayout(jPanel6Layout);
                jTabbedPane1.addTab("result1", null, jPanel6, null);
                {
                    resultBtn1 = new JButton();
                    jPanel6.add(resultBtn1);
                    resultBtn1.setText("to String[]");
                    resultBtn1.setPreferredSize(new java.awt.Dimension(105, 32));
                    resultBtn1.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            JTableUtil tableUtil = JTableUtil.newInstance(resultArea);
                            int[] rowPoss = tableUtil.getSelectedRows();
                            DefaultTableModel model = tableUtil.getModel();
                            List<Object> valueList = new ArrayList<Object>();
                            for (int ii = 0; ii < rowPoss.length; ii++) {
                                valueList.add(model.getValueAt(rowPoss[ii], 0));
                            }
                            String reult = valueList.toString().replaceAll("[\\s]", "")
                                    .replaceAll("[\\,]", "\",\"").replaceAll("[\\[\\]]", "\"");
                            ClipboardUtil.getInstance().setContents(reult);
                        }
                    });
                }
                {
                    resultBtn2 = new JButton();
                    jPanel6.add(resultBtn2);
                    resultBtn2.setText("TODO");
                    resultBtn2.setPreferredSize(new java.awt.Dimension(105, 32));
                    resultBtn2.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            System.out.println("resultBtn1.actionPerformed, event=" + evt);
                            // TODO add your code for
                            // resultBtn1.actionPerformed
                            JCommonUtil._jOptionPane_showMessageDialog_info("TODO");
                        }
                    });
                }
            }
        }
        this.setSize(512, 350);
        JCommonUtil.setFont(repToText, repFromText, replaceArea, templateList);
        {
            panel = new JPanel();
            jTabbedPane1.addTab("eBao", null, panel, null);
            panel.setLayout(new BorderLayout(0, 0));
            {
                scrollPane = new JScrollPane();
                panel.add(scrollPane, BorderLayout.CENTER);
                {
                    ebaoTable = new JTable();
                    scrollPane.setViewportView(ebaoTable);
                    // TODO
                    DefaultTableModel ebaoModel = JTableUtil.createModel(true, "match", "label");
                    JTableUtil.defaultSetting(ebaoTable);
                    ebaoTable.setModel(ebaoModel);
                }
            }
            {
                exactEbaoSearchChk = new JCheckBox("");
                panel.add(exactEbaoSearchChk, BorderLayout.NORTH);
            }
        }

        JCommonUtil.frameCloseDo(this, new WindowAdapter() {
            public void windowClosing(WindowEvent paramWindowEvent) {
                if (StringUtils.isNotBlank(repFromText.getText())) {
                    prop.put(repFromText.getText(), repToText.getText());
                }
                try {
                    prop.store(new FileOutputStream(propFile), "regexText");
                } catch (Exception e) {
                    JCommonUtil.handleException("properties store error!", e);
                }
                setVisible(false);
                dispose();
            }
        });
    } catch (Exception e) {
        e.printStackTrace();
    }
}

From source file:finale.year.stage.main.Authentification.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  w w .  j  a  va  2s.c om
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
// Generated using JFormDesigner Evaluation license - unknown
private void initComponents() {
    innerPanel = new JPanel();
    emailField = new JTextField();
    rememberMe = new JCheckBox();
    logInBtn = new JButton();
    passWord = new JPasswordField();
    signUpBtn = new JButton();
    forgotBtn = new JButton();
    userIcon = new JLabel();
    passwordIcon = new JLabel();
    errorStatusBar = new JLabel();

    //======== this ========

    // JFormDesigner evaluation mark
    setBorder(
            new javax.swing.border.CompoundBorder(
                    new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                            "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                            javax.swing.border.TitledBorder.BOTTOM,
                            new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red),
                    getBorder()));
    addPropertyChangeListener(new java.beans.PropertyChangeListener() {
        public void propertyChange(java.beans.PropertyChangeEvent e) {
            if ("border".equals(e.getPropertyName()))
                throw new RuntimeException();
        }
    });

    setLayout(new GridBagLayout());

    //======== innerPanel ========
    {
        innerPanel.setBorder(new EtchedBorder());

        //---- emailField ----
        emailField.setText("Email");
        emailField.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                emailFieldActionPerformed(e);
            }
        });

        //---- rememberMe ----
        rememberMe.setText("Remember me");
        rememberMe.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                rememberMeActionPerformed(e);
            }
        });

        //---- logInBtn ----
        logInBtn.setText("Log In");
        logInBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                logInBtnActionPerformed(e);
            }
        });

        //---- passWord ----
        passWord.setText("password");

        //---- signUpBtn ----
        signUpBtn.setText("Sign Up");
        signUpBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                signUpBtnActionPerformed(e);
            }
        });

        //---- forgotBtn ----
        forgotBtn.setText("Forgot Password?");
        forgotBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                forgotBtnActionPerformed(e);
            }
        });

        //---- userIcon ----
        userIcon.setIcon(new ImageIcon(getClass().getResource("/Resources/glyphicons_user.png")));

        //---- passwordIcon ----
        passwordIcon.setIcon(new ImageIcon(getClass().getResource("/Resources/glyphicons_lock.png")));

        GroupLayout innerPanelLayout = new GroupLayout(innerPanel);
        innerPanel.setLayout(innerPanelLayout);
        innerPanelLayout.setHorizontalGroup(innerPanelLayout.createParallelGroup().addGroup(innerPanelLayout
                .createSequentialGroup()
                .addGroup(innerPanelLayout.createParallelGroup()
                        .addGroup(innerPanelLayout.createSequentialGroup().addGap(106, 106, 106)
                                .addComponent(forgotBtn))
                        .addGroup(innerPanelLayout.createSequentialGroup().addGap(73, 73, 73)
                                .addGroup(innerPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
                                        .addComponent(userIcon, GroupLayout.PREFERRED_SIZE, 45,
                                                GroupLayout.PREFERRED_SIZE)
                                        .addComponent(passwordIcon, GroupLayout.PREFERRED_SIZE, 45,
                                                GroupLayout.PREFERRED_SIZE))
                                .addGap(18, 18, 18)
                                .addGroup(innerPanelLayout
                                        .createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                                        .addComponent(passWord).addComponent(emailField,
                                                GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE)))
                        .addGroup(innerPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                                .addGroup(innerPanelLayout.createSequentialGroup().addGap(106, 106, 106)
                                        .addComponent(rememberMe)
                                        .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED,
                                                GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(logInBtn, GroupLayout.PREFERRED_SIZE, 79,
                                                GroupLayout.PREFERRED_SIZE))
                                .addGroup(innerPanelLayout.createSequentialGroup().addGap(375, 375, 375)
                                        .addComponent(signUpBtn, GroupLayout.PREFERRED_SIZE, 79,
                                                GroupLayout.PREFERRED_SIZE)))
                        .addGroup(innerPanelLayout.createSequentialGroup().addGap(218, 218, 218)
                                .addComponent(errorStatusBar)))
                .addContainerGap(100, Short.MAX_VALUE)));
        innerPanelLayout.setVerticalGroup(innerPanelLayout.createParallelGroup().addGroup(innerPanelLayout
                .createSequentialGroup().addContainerGap().addComponent(errorStatusBar).addGap(30, 30, 30)
                .addGroup(innerPanelLayout.createParallelGroup()
                        .addComponent(userIcon, GroupLayout.PREFERRED_SIZE, 42, GroupLayout.PREFERRED_SIZE)
                        .addComponent(emailField, GroupLayout.PREFERRED_SIZE, 42, GroupLayout.PREFERRED_SIZE))
                .addGap(30, 30, 30)
                .addGroup(innerPanelLayout.createParallelGroup()
                        .addComponent(passwordIcon, GroupLayout.PREFERRED_SIZE, 38, GroupLayout.PREFERRED_SIZE)
                        .addComponent(passWord, GroupLayout.PREFERRED_SIZE, 38, GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(
                        innerPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                .addComponent(rememberMe, GroupLayout.PREFERRED_SIZE, 59,
                                        GroupLayout.PREFERRED_SIZE)
                                .addComponent(logInBtn))
                .addGap(6, 6, 6).addComponent(forgotBtn).addGap(6, 6, 6).addComponent(signUpBtn)
                .addContainerGap(69, Short.MAX_VALUE)));
    }
    add(innerPanel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST,
            GridBagConstraints.NONE, new Insets(0, 0, 0, 0), -20, 4));
}

From source file:com.pos.spatobiz.app.view.karyawan.UbahKaryawan.java

/** This method is called from within the constructor to
 * initialize the form.//from   w ww  . j  a  v a 2  s  .  c om
 * 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() {

    jeniskelamin = new ButtonGroup();
    labelKode = new WhiteLabel();
    labelNama = new WhiteLabel();
    labelTanggalLahir = new WhiteLabel();
    labelAlamat = new WhiteLabel();
    textKode = new TextBoxTransfer();
    textNama = new TextBoxTransfer();
    textTanggalLahir = new DateBox();
    textAlamat = new WhiteTextArea();
    errorKode = new RedLabel();
    errorNama = new RedLabel();
    errorTanggalLahir = new RedLabel();
    errorAlamat = new RedLabel();
    textTelepon = new TextBoxTransfer();
    labelTelepon = new WhiteLabel();
    labelEmail = new WhiteLabel();
    labelJenisKelamin = new WhiteLabel();
    labelPhoto = new WhiteLabel();
    textEmail = new TextBoxTransfer();
    radioPria = new JRadioButton();
    radioWanita = new JRadioButton();
    errorTelepon = new RedLabel();
    errorEmail = new RedLabel();
    imageChooser = new ImageChooser();
    buttonBatal = new Button();
    buttonUbah = new Button();
    buttonCari = new Button();

    setBackground(new Color(0, 0, 0));

    labelKode.setHorizontalAlignment(SwingConstants.RIGHT);
    labelKode.setText("Kode :");

    labelNama.setHorizontalAlignment(SwingConstants.RIGHT);
    labelNama.setText("Nama :");

    labelTanggalLahir.setHorizontalAlignment(SwingConstants.RIGHT);
    labelTanggalLahir.setText("Tanggal Lahir :");

    labelAlamat.setHorizontalAlignment(SwingConstants.RIGHT);
    labelAlamat.setText("Alamat :");

    textTanggalLahir.setFormatterFactory(
            new DefaultFormatterFactory(new DateFormatter(DateFormat.getDateInstance(DateFormat.LONG))));
    textTanggalLahir.setPreferredSize(new Dimension(120, 24));
    textTanggalLahir.setValue(new Date());

    errorKode.setText("error kode");

    errorNama.setText("error nama");

    errorTanggalLahir.setText("error tanggal lahir");

    errorAlamat.setText("error alamat");

    labelTelepon.setHorizontalAlignment(SwingConstants.RIGHT);
    labelTelepon.setText("Telepon :");

    labelEmail.setHorizontalAlignment(SwingConstants.RIGHT);
    labelEmail.setText("Email :");

    labelJenisKelamin.setHorizontalAlignment(SwingConstants.RIGHT);
    labelJenisKelamin.setText("Jenis Kelamin :");

    labelPhoto.setHorizontalAlignment(SwingConstants.RIGHT);
    labelPhoto.setText("Photo :");

    jeniskelamin.add(radioPria);
    radioPria.setFont(new Font("Tahoma", 1, 11));
    radioPria.setForeground(new Color(255, 255, 255));
    radioPria.setSelected(true);
    radioPria.setText("Pria");
    radioPria.setOpaque(false);

    jeniskelamin.add(radioWanita);
    radioWanita.setFont(new Font("Tahoma", 1, 11));
    radioWanita.setForeground(new Color(255, 255, 255));
    radioWanita.setText("Wanita");
    radioWanita.setOpaque(false);

    errorTelepon.setText("error telepon");

    errorEmail.setText("error email");

    buttonBatal.setMnemonic('B');
    buttonBatal.setText("Batal");

    buttonUbah.setMnemonic('U');
    buttonUbah.setText("Ubah");

    buttonCari.setText("Cari");

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(Alignment.TRAILING,
                    layout.createSequentialGroup().addGroup(layout.createParallelGroup(Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(Alignment.TRAILING, false)
                                    .addComponent(labelPhoto, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelJenisKelamin, Alignment.LEADING,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelEmail, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(layout.createParallelGroup(Alignment.TRAILING, false)
                                    .addComponent(labelTelepon, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelTanggalLahir, Alignment.LEADING,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelAlamat, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelNama, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelKode, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                            .addPreferredGap(ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(Alignment.TRAILING)
                                    .addComponent(textAlamat, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 403,
                                            Short.MAX_VALUE)
                                    .addComponent(textNama, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 403,
                                            Short.MAX_VALUE)
                                    .addComponent(textTanggalLahir, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            403, Short.MAX_VALUE)
                                    .addComponent(textTelepon, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE)
                                    .addGroup(Alignment.LEADING,
                                            layout.createSequentialGroup().addComponent(radioPria)
                                                    .addPreferredGap(ComponentPlacement.UNRELATED)
                                                    .addComponent(radioWanita))
                                    .addComponent(imageChooser, Alignment.LEADING, GroupLayout.PREFERRED_SIZE,
                                            253, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(textEmail, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE)
                                    .addGroup(layout.createSequentialGroup()
                                            .addComponent(textKode, GroupLayout.DEFAULT_SIZE, 339,
                                                    Short.MAX_VALUE)
                                            .addPreferredGap(ComponentPlacement.UNRELATED)
                                            .addComponent(buttonCari, GroupLayout.PREFERRED_SIZE,
                                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
                            .addGap(4, 4, 4)
                            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                                    .addComponent(errorKode, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(errorNama, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(errorTanggalLahir, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(errorAlamat, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(errorTelepon, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(errorEmail, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
                    .addGroup(Alignment.TRAILING, layout.createSequentialGroup()
                            .addComponent(buttonUbah, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(ComponentPlacement.RELATED).addComponent(buttonBatal,
                                    GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)))
            .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(labelKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(textKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(errorKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(buttonCari, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(labelNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(textNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(errorNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(labelTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(textTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(errorTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                    .addComponent(labelAlamat, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(textAlamat, GroupLayout.PREFERRED_SIZE, 88, GroupLayout.PREFERRED_SIZE)
                    .addComponent(errorAlamat, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(textTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(errorTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(labelEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(textEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(errorEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(labelJenisKelamin, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(radioPria).addComponent(radioWanita))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                    .addComponent(labelPhoto, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(imageChooser, GroupLayout.PREFERRED_SIZE, 189, GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(buttonBatal, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(buttonUbah, 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);// www .j a  v a2  s.co  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:EnrollFingerprint.Verify.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 w w. j  av a  2 s  .com
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    buttonGroup1 = new javax.swing.ButtonGroup();
    jPanelBackground = new javax.swing.JPanel();
    picFingerprint = new javax.swing.JLabel();
    jPanelConsole = new javax.swing.JPanel();
    txtConsole = new javax.swing.JTextField();
    lblConsole = new javax.swing.JLabel();
    btnCancel = new javax.swing.JButton();
    jPanelLog = new javax.swing.JPanel();
    JScrollPane1 = new javax.swing.JScrollPane();
    txtLog = new javax.swing.JTextArea();
    lblLog = new javax.swing.JLabel();
    btnVerify = new javax.swing.JButton();
    lblStatus = new javax.swing.JLabel();
    btnFind = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Almacenar Huellas");
    setResizable(false);

    jPanelBackground.setBackground(new java.awt.Color(238, 241, 245));

    picFingerprint.setBackground(new java.awt.Color(255, 255, 255));
    picFingerprint.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

    jPanelConsole.setBackground(new java.awt.Color(255, 255, 255));

    txtConsole.setEditable(false);
    txtConsole.setForeground(new java.awt.Color(136, 136, 136));
    txtConsole.setText("Consola de estado");

    lblConsole.setForeground(new java.awt.Color(136, 136, 136));
    lblConsole.setText("Consola:");

    javax.swing.GroupLayout jPanelConsoleLayout = new javax.swing.GroupLayout(jPanelConsole);
    jPanelConsole.setLayout(jPanelConsoleLayout);
    jPanelConsoleLayout.setHorizontalGroup(jPanelConsoleLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelConsoleLayout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanelConsoleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtConsole).addGroup(jPanelConsoleLayout.createSequentialGroup()
                                    .addComponent(lblConsole).addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanelConsoleLayout.setVerticalGroup(jPanelConsoleLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelConsoleLayout.createSequentialGroup()
                    .addGap(5, 5, 5).addComponent(lblConsole)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(txtConsole, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(15, Short.MAX_VALUE)));

    btnCancel.setText("Cancelar");
    btnCancel.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCancelActionPerformed(evt);
        }
    });

    jPanelLog.setBackground(new java.awt.Color(255, 255, 255));

    txtLog.setEditable(false);
    txtLog.setColumns(20);
    txtLog.setForeground(new java.awt.Color(168, 168, 168));
    txtLog.setRows(5);
    JScrollPane1.setViewportView(txtLog);

    lblLog.setForeground(new java.awt.Color(136, 136, 136));
    lblLog.setText("Estado:");

    javax.swing.GroupLayout jPanelLogLayout = new javax.swing.GroupLayout(jPanelLog);
    jPanelLog.setLayout(jPanelLogLayout);
    jPanelLogLayout.setHorizontalGroup(jPanelLogLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelLogLayout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanelLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(JScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, 409, Short.MAX_VALUE)
                            .addGroup(jPanelLogLayout.createSequentialGroup().addComponent(lblLog).addGap(0, 0,
                                    Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanelLogLayout.setVerticalGroup(jPanelLogLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelLogLayout.createSequentialGroup().addContainerGap().addComponent(lblLog)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(JScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 192, Short.MAX_VALUE)
                    .addContainerGap()));

    btnVerify.setText("Verificar Huella");
    btnVerify.setEnabled(false);
    btnVerify.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnVerifyActionPerformed(evt);
        }
    });

    lblStatus.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    lblStatus.setText("Intentos");

    btnFind.setText("Cargar Huellas");
    btnFind.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnFindActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanelBackgroundLayout = new javax.swing.GroupLayout(jPanelBackground);
    jPanelBackground.setLayout(jPanelBackgroundLayout);
    jPanelBackgroundLayout.setHorizontalGroup(jPanelBackgroundLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelBackgroundLayout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanelBackgroundLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanelBackgroundLayout.createSequentialGroup()
                                    .addComponent(picFingerprint, javax.swing.GroupLayout.PREFERRED_SIZE, 250,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(jPanelBackgroundLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jPanelConsole, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jPanelLog, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                            .addGroup(jPanelBackgroundLayout.createSequentialGroup().addComponent(lblStatus)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(btnFind)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(btnVerify)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(btnCancel)))
                    .addContainerGap()));
    jPanelBackgroundLayout.setVerticalGroup(jPanelBackgroundLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelBackgroundLayout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanelBackgroundLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanelBackgroundLayout.createSequentialGroup()
                                    .addComponent(jPanelConsole, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanelLog, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(picFingerprint, javax.swing.GroupLayout.PREFERRED_SIZE, 300,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
                    .addGroup(jPanelBackgroundLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnCancel).addComponent(btnVerify).addComponent(lblStatus)
                            .addComponent(btnFind))
                    .addContainerGap()));

    btnFind.getAccessibleContext().setAccessibleName("Cargar Huellas");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanelBackground, javax.swing.GroupLayout.DEFAULT_SIZE,
                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
            jPanelBackground, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
            Short.MAX_VALUE));

    pack();
}

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

    folderChooser = new javax.swing.JFileChooser();
    mainPanel = new javax.swing.JPanel();
    jPanel1 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    jEditorPane1 = new javax.swing.JEditorPane();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    jPanel5 = new javax.swing.JPanel();
    jScrollPane5 = new javax.swing.JScrollPane();
    txtRssItemDescription1 = new javax.swing.JTextArea();
    btnLast = new javax.swing.JButton();
    btnNext = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    btnPrev = new javax.swing.JButton();
    btnFirst = new javax.swing.JButton();
    jLabel6 = new javax.swing.JLabel();
    jScrollPane4 = new javax.swing.JScrollPane();
    jTable2 = new javax.swing.JTable();
    btnDownload = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    btnAddToCollection = new javax.swing.JButton();
    btnLoad = new javax.swing.JButton();
    jLabel2 = new javax.swing.JLabel();
    txtUrlDesc = new javax.swing.JTextField();
    jScrollPane3 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jLabel3 = new javax.swing.JLabel();
    txtRssLink = new javax.swing.JTextField();
    btnFetch = new javax.swing.JButton();
    jLabel4 = new javax.swing.JLabel();
    jPanel3 = new javax.swing.JPanel();
    jLabel7 = new javax.swing.JLabel();
    txtDownloadPath = new javax.swing.JTextField();
    btnChangeFolder = new javax.swing.JButton();
    btnOpenFolder = new javax.swing.JButton();

    mainPanel.setBackground(java.awt.Color.white);
    mainPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    mainPanel.setPreferredSize(new java.awt.Dimension(1210, 730));
    mainPanel.setRequestFocusEnabled(false);

    jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jPanel1.setPreferredSize(new java.awt.Dimension(1178, 435));

    jEditorPane1.setContentType("text/html"); // NOI18N

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

    jScrollPane2.setViewportView(jEditorPane1);

    org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty
            .create("${rssHeader.itemList}");
    org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings
            .createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
                    eLProperty, jTable1);
    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding
            .addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${title}"));
    columnBinding.setColumnName("Title");
    columnBinding.setColumnClass(String.class);
    bindingGroup.addBinding(jTableBinding);
    jTableBinding.bind();
    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${selectedItem}"), jTable1,
            org.jdesktop.beansbinding.BeanProperty.create("selectedElement"));
    bindingGroup.addBinding(binding);

    jScrollPane1.setViewportView(jTable1);

    jPanel5.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    txtRssItemDescription1.setColumns(20);
    txtRssItemDescription1.setLineWrap(true);
    txtRssItemDescription1.setRows(5);
    txtRssItemDescription1.setWrapStyleWord(true);

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

    jScrollPane5.setViewportView(txtRssItemDescription1);

    btnLast.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/forward.png"))); // NOI18N
    btnLast.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnLastActionPerformed(evt);
        }
    });

    btnNext.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/arrow-right.png"))); // NOI18N
    btnNext.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnNextActionPerformed(evt);
        }
    });

    jLabel1.setText("Image Description :");

    btnPrev.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/arrow-left.png"))); // NOI18N
    btnPrev.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnPrevActionPerformed(evt);
        }
    });

    btnFirst.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/backward.png"))); // NOI18N
    btnFirst.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnFirstActionPerformed(evt);
        }
    });

    jLabel6.setText("Image Link :");

    eLProperty = org.jdesktop.beansbinding.ELProperty.create("${selectedItem.imageList}");
    jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, eLProperty, jTable2);
    columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${url}"));
    columnBinding.setColumnName("Url");
    columnBinding.setColumnClass(String.class);
    bindingGroup.addBinding(jTableBinding);
    jTableBinding.bind();
    jScrollPane4.setViewportView(jTable2);

    btnDownload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/download.png"))); // NOI18N
    btnDownload.setText("Download");
    btnDownload.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDownloadActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout.setHorizontalGroup(jPanel5Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap().addGroup(jPanel5Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addGroup(jPanel5Layout.createSequentialGroup().addGroup(jPanel5Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addGroup(jPanel5Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jLabel6)
                                    .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 234,
                                            Short.MAX_VALUE)
                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                            .addComponent(btnFirst, javax.swing.GroupLayout.PREFERRED_SIZE, 47,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(
                                                    javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(btnPrev, javax.swing.GroupLayout.PREFERRED_SIZE, 47,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                    22, Short.MAX_VALUE)
                                            .addComponent(btnNext, javax.swing.GroupLayout.PREFERRED_SIZE, 47,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(
                                                    javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(btnLast, javax.swing.GroupLayout.PREFERRED_SIZE, 47,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(btnDownload, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                            .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap().addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 163,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel6)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 109,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(btnDownload).addGap(18, 18, 18)
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(btnLast).addComponent(btnFirst).addComponent(btnPrev)
                            .addComponent(btnNext))
                    .addContainerGap()));

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 270,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane2)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jScrollPane1).addComponent(jScrollPane2))
                    .addContainerGap()));

    jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jPanel2.setPreferredSize(new java.awt.Dimension(1190, 140));

    btnAddToCollection.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/save.png"))); // NOI18N
    btnAddToCollection.setText("Save");
    btnAddToCollection.setToolTipText("Save to Collection");
    btnAddToCollection.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnAddToCollectionActionPerformed(evt);
        }
    });

    btnLoad.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/magnifier.png"))); // NOI18N
    btnLoad.setText("Load");
    btnLoad.setToolTipText("Load from Collection");
    btnLoad.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnLoadActionPerformed(evt);
        }
    });

    jLabel2.setText("Tumblr URL ");

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

    jTextArea1.setColumns(20);
    jTextArea1.setLineWrap(true);
    jTextArea1.setRows(5);

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

    jScrollPane3.setViewportView(jTextArea1);

    jLabel3.setText("URL Title   ");

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

    btnFetch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/refresh.png"))); // NOI18N
    btnFetch.setText("Fetch");
    btnFetch.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnFetchActionPerformed(evt);
        }
    });

    jLabel4.setText("URL Description");

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel2Layout
                    .createSequentialGroup().addContainerGap().addGroup(jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel4))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane3)
                            .addGroup(jPanel2Layout.createSequentialGroup().addComponent(txtRssLink)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(btnFetch, javax.swing.GroupLayout.PREFERRED_SIZE, 123,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(btnAddToCollection, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            119, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(btnLoad, javax.swing.GroupLayout.PREFERRED_SIZE, 127,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(txtUrlDesc))
                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addGap(7, 7, 7).addGroup(jPanel2Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtRssLink, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2).addComponent(btnFetch).addComponent(btnLoad)
                    .addComponent(btnAddToCollection))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtUrlDesc, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4).addComponent(jScrollPane3,
                                    javax.swing.GroupLayout.PREFERRED_SIZE, 39,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(14, Short.MAX_VALUE)));

    jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jPanel3.setPreferredSize(new java.awt.Dimension(1178, 89));

    jLabel7.setText("Download Path");

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

    btnChangeFolder.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/change-folder.png"))); // NOI18N
    btnChangeFolder.setText("Change Folder");
    btnChangeFolder.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnChangeFolderActionPerformed(evt);
        }
    });

    btnOpenFolder.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/open-folder.png"))); // NOI18N
    btnOpenFolder.setText("Open Folder");
    btnOpenFolder.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnOpenFolderActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap().addComponent(jLabel7)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(txtDownloadPath, javax.swing.GroupLayout.DEFAULT_SIZE, 675, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(btnChangeFolder, javax.swing.GroupLayout.PREFERRED_SIZE, 185,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(btnOpenFolder, javax.swing.GroupLayout.PREFERRED_SIZE, 186,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap().addGroup(jPanel3Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel7)
                    .addComponent(txtDownloadPath, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnChangeFolder).addComponent(btnOpenFolder))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
    mainPanel.setLayout(mainPanelLayout);
    mainPanelLayout.setHorizontalGroup(mainPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, 1198, Short.MAX_VALUE)
                            .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, 1198, Short.MAX_VALUE)
                            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 1198, Short.MAX_VALUE))
                    .addContainerGap()));
    mainPanelLayout.setVerticalGroup(mainPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainPanelLayout.createSequentialGroup().addGap(9, 9, 9)
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 131,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 467, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel3,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(6, 6, 6)));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1250, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout
                            .createSequentialGroup().addContainerGap().addComponent(mainPanel,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, 1226, Short.MAX_VALUE)
                            .addContainerGap())));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 709, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addContainerGap()
                            .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 685, Short.MAX_VALUE)
                            .addContainerGap())));

    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//from  w w w  . 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:at.becast.youploader.gui.FrmMain.java

/**
 * //from w w  w  .  j  av  a  2s .c  o  m
 */
public void initComponents() {
    if (Main.debug)
        LOG.debug("init Components", FrmMain.class);

    int left = Integer.parseInt(Main.s.get("left", "0"));
    int top = Integer.parseInt(Main.s.get("top", "0"));
    int width = Integer.parseInt(Main.s.get("width", DEFAULT_WIDTH));
    int height = Integer.parseInt(Main.s.get("height", DEFAULT_HEIGHT));
    setBounds(left, top, width, height);
    TabbedPane = new JTabbedPane();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle(Main.APP_NAME + " " + Main.VERSION);
    setName("frmMain");
    //Main Tab Creation
    initMainTab();

    //Queue Tab creation
    initQueuetab();

    //Playlist Settings Tab creation
    initPlaylistSettingsTab();

    statusBar = new StatusBar();

    GroupLayout layout = new GroupLayout(getContentPane());
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)
            .addComponent(statusBar, GroupLayout.DEFAULT_SIZE, 884, Short.MAX_VALUE)
            .addComponent(TabbedPane, GroupLayout.DEFAULT_SIZE, 884, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(Alignment.TRAILING,
            layout.createSequentialGroup()
                    .addComponent(TabbedPane, GroupLayout.PREFERRED_SIZE, 498, Short.MAX_VALUE)
                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(statusBar,
                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)));
    getContentPane().setLayout(layout);

    cmbCategory.addPropertyChangeListener(new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent arg0) {
            changeCategory();
        }
    });
    QueuePanel.revalidate();
}

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   w  ww . j  av  a 2s.  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();
}