Example usage for javax.swing GroupLayout GroupLayout

List of usage examples for javax.swing GroupLayout GroupLayout

Introduction

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

Prototype

public GroupLayout(Container host) 

Source Link

Document

Creates a GroupLayout for the specified Container .

Usage

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

private void initGUI() {
    try {//  w w  w.j  a  v  a 2 s.  co 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);

        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:com.josescalia.tumblr.form.PreferenceForm.java

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

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

    jPanel1.setBorder(BorderFactory.createEtchedBorder());

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

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

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

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

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

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

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

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

    jPanel12.setBorder(BorderFactory.createEtchedBorder());

    txtProxyPort.setEnabled(false);

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

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

    jLabel2.setText("Proxy Port");

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

    txtProxyPassword.setEnabled(false);

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

    jLabel3.setText("Username ");

    txtProxyUsername.setEnabled(false);

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

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

    jLabel1.setText("Proxy Host");

    jLabel4.setText("Password");

    txtProxyHost.setEnabled(false);

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

    checkProxyNeedAuth.setText("Proxy Need Authentication");

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

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

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

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

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

    jPanel2.setBorder(BorderFactory.createEtchedBorder());

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

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

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

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

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

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

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

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

    jPanel14.setBorder(BorderFactory.createEtchedBorder());

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

    jLabel6.setText("Default Download Path");

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

    jLabel7.setText("Default Folder Viewer");

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

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

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

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

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

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

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

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

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

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

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

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

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

    jPanel13.setBorder(BorderFactory.createEtchedBorder());

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

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

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

    jLabel9.setText("Total Cache File");

    txtTotalFileSize1.setEditable(false);

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

    txtTotalFileSize.setEditable(false);

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

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

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

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

    jPanel5.setBorder(BorderFactory.createEtchedBorder());

    txtTotalLogSize.setEditable(false);

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

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

    txtTotalLog.setEditable(false);

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

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

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

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

    jPanel6.setBorder(BorderFactory.createEtchedBorder());

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

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

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

    jScrollPane1.setViewportView(txtLogContent);

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

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

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

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

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

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

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

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

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

    jPanel15.setBorder(BorderFactory.createEtchedBorder());

    txtAppLookAndFeel.setEditable(false);

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

    jLabel10.setText("Look And Feel ");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    bindingGroup.bind();
}

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

private void initGUI() {
    try {//from  www  .jav  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./* www .  j  ava 2 s .c o m*/
 */
@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:org.biojava.bio.view.MotifAnalyzer.java

private JPanel getInputTab() {
    inputTab = new JPanel(new GridLayout(1, 1)); //////////////////
    {/*from w  w w  .  jav  a2  s .  c o m*/
        JPanel generalPar = new JPanel();
        inputTab.add(generalPar);
        GroupLayout inputTabLayout = new GroupLayout((JComponent) generalPar);
        generalPar.setLayout(inputTabLayout);
        generalPar.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.black),
                "General Parameters", 0, 0, new Font(Font.DIALOG, Font.BOLD, 16), Color.black));
        generalPar.setPreferredSize(new java.awt.Dimension(787, 291));
        inputTabLayout.setHorizontalGroup(inputTabLayout.createSequentialGroup().addContainerGap(12, 12)
                .addGroup(inputTabLayout.createParallelGroup()
                        .addGroup(GroupLayout.Alignment.LEADING,
                                inputTabLayout.createSequentialGroup()
                                        .addComponent(getCheckReverse(), GroupLayout.PREFERRED_SIZE, 198,
                                                GroupLayout.PREFERRED_SIZE)
                                        .addGap(250))
                        .addGroup(GroupLayout.Alignment.LEADING,
                                inputTabLayout.createSequentialGroup()
                                        .addComponent(getMultipleDataSets(), GroupLayout.PREFERRED_SIZE, 193,
                                                GroupLayout.PREFERRED_SIZE)
                                        .addGap(255))
                        .addGroup(inputTabLayout.createSequentialGroup()
                                .addGroup(inputTabLayout.createParallelGroup()
                                        .addComponent(getJLabel1(), GroupLayout.Alignment.LEADING,
                                                GroupLayout.PREFERRED_SIZE, 187, GroupLayout.PREFERRED_SIZE)
                                        .addGroup(GroupLayout.Alignment.LEADING,
                                                inputTabLayout.createSequentialGroup()
                                                        .addComponent(getJLabel8(), GroupLayout.PREFERRED_SIZE,
                                                                113, GroupLayout.PREFERRED_SIZE)
                                                        .addGap(74))
                                        .addGroup(GroupLayout.Alignment.LEADING,
                                                inputTabLayout.createSequentialGroup()
                                                        .addComponent(getJLabel7(), GroupLayout.PREFERRED_SIZE,
                                                                80, GroupLayout.PREFERRED_SIZE)
                                                        .addGap(107))
                                        .addGroup(GroupLayout.Alignment.LEADING,
                                                inputTabLayout.createSequentialGroup()
                                                        .addComponent(getJLabel2(), GroupLayout.PREFERRED_SIZE,
                                                                128, GroupLayout.PREFERRED_SIZE)
                                                        .addGap(59))
                                        .addGroup(GroupLayout.Alignment.LEADING,
                                                inputTabLayout.createSequentialGroup()
                                                        .addComponent(getJLabel3(), GroupLayout.PREFERRED_SIZE,
                                                                148, GroupLayout.PREFERRED_SIZE)
                                                        .addGap(39))
                                        .addGroup(GroupLayout.Alignment.LEADING,
                                                inputTabLayout.createSequentialGroup()
                                                        .addComponent(getJLabel4(), GroupLayout.PREFERRED_SIZE,
                                                                137, GroupLayout.PREFERRED_SIZE)
                                                        .addGap(50))
                                        .addGroup(GroupLayout.Alignment.LEADING,
                                                inputTabLayout.createSequentialGroup()
                                                        .addComponent(getJLabel6(), GroupLayout.PREFERRED_SIZE,
                                                                126, GroupLayout.PREFERRED_SIZE)
                                                        .addGap(61))
                                        .addGroup(GroupLayout.Alignment.LEADING,
                                                inputTabLayout.createSequentialGroup()
                                                        .addComponent(getJLabel5(), GroupLayout.PREFERRED_SIZE,
                                                                108, GroupLayout.PREFERRED_SIZE)
                                                        .addGap(79))
                                        .addGroup(GroupLayout.Alignment.LEADING,
                                                inputTabLayout.createSequentialGroup()
                                                        .addComponent(getJLabel9(), GroupLayout.PREFERRED_SIZE,
                                                                155, GroupLayout.PREFERRED_SIZE)
                                                        .addGap(32)))
                                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(inputTabLayout.createParallelGroup().addGroup(
                                        GroupLayout.Alignment.LEADING,
                                        inputTabLayout.createSequentialGroup()
                                                .addComponent(getMinPoints(), GroupLayout.PREFERRED_SIZE, 122,
                                                        GroupLayout.PREFERRED_SIZE)
                                                .addGap(134))
                                        .addGroup(GroupLayout.Alignment.LEADING,
                                                inputTabLayout.createSequentialGroup()
                                                        .addComponent(getClusteringEpsilon(),
                                                                GroupLayout.PREFERRED_SIZE, 122,
                                                                GroupLayout.PREFERRED_SIZE)
                                                        .addGap(134))
                                        .addGroup(GroupLayout.Alignment.LEADING, inputTabLayout
                                                .createSequentialGroup()
                                                .addComponent(getNumOfMotifs(), GroupLayout.PREFERRED_SIZE, 69,
                                                        GroupLayout.PREFERRED_SIZE)
                                                .addGap(187))
                                        .addGroup(GroupLayout.Alignment.LEADING, inputTabLayout
                                                .createSequentialGroup()
                                                .addComponent(getNumOfTrials(), GroupLayout.PREFERRED_SIZE, 69,
                                                        GroupLayout.PREFERRED_SIZE)
                                                .addGap(187))
                                        .addGroup(GroupLayout.Alignment.LEADING, inputTabLayout
                                                .createSequentialGroup()
                                                .addComponent(getMotifWidth(), GroupLayout.PREFERRED_SIZE, 69,
                                                        GroupLayout.PREFERRED_SIZE)
                                                .addGap(187))
                                        .addGroup(GroupLayout.Alignment.LEADING,
                                                inputTabLayout.createSequentialGroup()
                                                        .addComponent(getDatasetTypeComboBox(),
                                                                GroupLayout.PREFERRED_SIZE, 145,
                                                                GroupLayout.PREFERRED_SIZE)
                                                        .addGap(111))
                                        .addGroup(GroupLayout.Alignment.LEADING, inputTabLayout
                                                .createSequentialGroup()
                                                .addComponent(getDatasetComboBox(), GroupLayout.PREFERRED_SIZE,
                                                        145, GroupLayout.PREFERRED_SIZE)
                                                .addGap(111))
                                        .addComponent(getSpeciesType(), GroupLayout.Alignment.LEADING,
                                                GroupLayout.PREFERRED_SIZE, 256, GroupLayout.PREFERRED_SIZE)
                                        .addGroup(GroupLayout.Alignment.LEADING, inputTabLayout
                                                .createSequentialGroup()
                                                .addComponent(getNumOfClusters(), GroupLayout.PREFERRED_SIZE,
                                                        122, GroupLayout.PREFERRED_SIZE)
                                                .addGap(134)))))
                .addContainerGap(317, 317));
        inputTabLayout.setVerticalGroup(inputTabLayout.createSequentialGroup().addContainerGap()
                .addGroup(inputTabLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(getNumOfMotifs(), GroupLayout.Alignment.BASELINE,
                                GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                                GroupLayout.PREFERRED_SIZE)
                        .addComponent(getJLabel1(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE,
                                20, GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(inputTabLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(getSpeciesType(), GroupLayout.Alignment.BASELINE,
                                GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                                GroupLayout.PREFERRED_SIZE)
                        .addComponent(getJLabel2(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE,
                                17, GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(inputTabLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(getNumOfTrials(), GroupLayout.Alignment.BASELINE,
                                GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE)
                        .addComponent(getJLabel3(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE,
                                GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(inputTabLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(getMotifWidth(), GroupLayout.Alignment.BASELINE,
                                GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                                GroupLayout.PREFERRED_SIZE)
                        .addComponent(getJLabel4(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE,
                                16, GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(inputTabLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(getDatasetTypeComboBox(), GroupLayout.Alignment.BASELINE,
                                GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                                GroupLayout.PREFERRED_SIZE)
                        .addComponent(getJLabel6(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE,
                                GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(inputTabLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(getDatasetComboBox(), GroupLayout.Alignment.BASELINE,
                                GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                                GroupLayout.PREFERRED_SIZE)
                        .addComponent(getJLabel5(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE,
                                GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
                .addGap(20)
                .addComponent(getMultipleDataSets(), GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)
                .addGap(19)
                .addComponent(getCheckReverse(), GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)
                .addGap(16)
                .addGroup(inputTabLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(getClusteringEpsilon(), GroupLayout.Alignment.BASELINE,
                                GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                                GroupLayout.PREFERRED_SIZE)
                        .addComponent(getJLabel7(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE,
                                GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(inputTabLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(getMinPoints(), GroupLayout.Alignment.BASELINE,
                                GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                                GroupLayout.PREFERRED_SIZE)
                        .addComponent(getJLabel8(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE,
                                GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(inputTabLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(getNumOfClusters(), GroupLayout.Alignment.BASELINE,
                                GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
                        .addComponent(getJLabel9(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE,
                                GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
                .addContainerGap(65, 65));
    }

    return inputTab;
}

From source file:edu.synth.SynthHelper.java

private void controls() {
    tabbedPane = new javax.swing.JTabbedPane();
    synthPanel = new GeneralSynthPanel();
    abundancesPanel = new AbundancesPanel();
    statusBar = new StatusBar("Workspace is not selected...");
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("SYNTHelper v. 1.0");
    tabbedPane.setToolTipText("SYNTH Settings");
    tabbedPane.addTab("Synthesis", synthPanel);
    tabbedPane.addTab("Abundances", abundancesPanel);
    GroupLayout layout = new GroupLayout(getContentPane());
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)
            .addComponent(tabbedPane, GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)
            .addComponent(statusBar, GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(Alignment.TRAILING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(tabbedPane, GroupLayout.DEFAULT_SIZE, 357, Short.MAX_VALUE)
                    .addComponent(statusBar, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)));
    getContentPane().setLayout(layout);/*from  ww  w.ja  va  2  s .  com*/
    tabbedPane.getAccessibleContext().setAccessibleDescription("");
    pack();
}

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  w w  . j  a v a  2 s .  c  o m*/
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    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:gtu._work.ui.RegexDirReplacer.java

private void initGUI() {
    try {//from  w ww  .  j  a  va 2s . 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);
                    {
                        ListModel srcListModel = new DefaultListModel();
                        srcList = new JList();
                        jScrollPane1.setViewportView(srcList);
                        srcList.setModel(srcListModel);
                        {
                            panel = new JPanel();
                            jScrollPane1.setRowHeaderView(panel);
                            panel.setLayout(new FormLayout(
                                    new ColumnSpec[] { ColumnSpec.decode("default:grow"), },
                                    new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
                                            FormFactory.DEFAULT_ROWSPEC, }));
                            {
                                childrenDirChkbox = new JCheckBox("??");
                                childrenDirChkbox.setSelected(true);
                                panel.add(childrenDirChkbox, "1, 1");
                            }
                            {
                                subFileNameText = new JTextField();
                                panel.add(subFileNameText, "1, 2, fill, default");
                                subFileNameText.setColumns(10);
                                subFileNameText.setText("(txt|java)");
                            }
                            {
                                replaceOldFileChkbox = new JCheckBox("");
                                replaceOldFileChkbox.setSelected(true);
                                panel.add(replaceOldFileChkbox, "1, 3");
                            }
                            {
                                charsetText = new JTextField();
                                panel.add(charsetText, "1, 5, fill, default");
                                charsetText.setColumns(10);
                                charsetText.setText("UTF8");
                            }
                        }
                        srcList.addMouseListener(new MouseAdapter() {
                            public void mouseClicked(MouseEvent evt) {
                                JListUtil.newInstance(srcList).defaultMouseClickOpenFile(evt);

                                JPopupMenuUtil.newInstance(srcList).applyEvent(evt)//
                                        .addJMenuItem("load files from clipboard", new ActionListener() {
                                            public void actionPerformed(ActionEvent arg0) {
                                                String content = ClipboardUtil.getInstance().getContents();
                                                DefaultListModel model = (DefaultListModel) srcList.getModel();
                                                StringTokenizer tok = new StringTokenizer(content, "\t\n\r\f",
                                                        false);
                                                for (; tok.hasMoreElements();) {
                                                    String val = ((String) tok.nextElement()).trim();
                                                    model.addElement(new File(val));
                                                }
                                            }
                                        }).show();
                            }
                        });
                        srcList.addKeyListener(new KeyAdapter() {
                            public void keyPressed(KeyEvent evt) {
                                JListUtil.newInstance(srcList).defaultJListKeyPressed(evt);
                            }
                        });
                    }
                }
                {
                    addDirFiles = new JButton();
                    jPanel1.add(addDirFiles, BorderLayout.NORTH);
                    addDirFiles.setText("add dir files");
                    addDirFiles.addActionListener(new ActionListener() {

                        public void actionPerformed(ActionEvent evt) {
                            File file = JFileChooserUtil.newInstance().selectDirectoryOnly().showOpenDialog()
                                    .getApproveSelectedFile();
                            if (file == null || !file.isDirectory()) {
                                return;
                            }

                            List<File> fileLst = new ArrayList<File>();

                            String subName = StringUtils.trimToEmpty(subFileNameText.getText());
                            if (StringUtils.isBlank(subName)) {
                                subName = ".*";
                            }
                            String patternStr = ".*\\." + subName;

                            if (childrenDirChkbox.isSelected()) {
                                FileUtil.searchFileMatchs(file, patternStr, fileLst);
                            } else {
                                for (File f : file.listFiles()) {
                                    if (f.isFile() && f.getName().matches(patternStr)) {
                                        fileLst.add(f);
                                    }
                                }
                            }

                            DefaultListModel model = new DefaultListModel();
                            for (File f : fileLst) {
                                model.addElement(f);
                            }
                            srcList.setModel(model);
                        }
                    });
                }
            }
            {
                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);
                    {

                        ListModel newRepListModel = new DefaultListModel();
                        newRepList = new JList();
                        jScrollPane2.setViewportView(newRepList);
                        newRepList.setModel(newRepListModel);
                        newRepList.addMouseListener(new MouseAdapter() {
                            static final String tortoiseMergeExe = "TortoiseMerge.exe";
                            static final String commandFormat = "cmd /c call \"%s\" /base:\"%s\" /theirs:\"%s\"";

                            public void mouseClicked(MouseEvent evt) {
                                if (!JListUtil.newInstance(newRepList).isCorrectMouseClick(evt)) {
                                    return;
                                }

                                OldNewFile oldNewFile = (OldNewFile) JListUtil
                                        .getLeadSelectionObject(newRepList);

                                String base = oldNewFile.newFile.getAbsolutePath();
                                String theirs = oldNewFile.oldFile.getAbsolutePath();

                                String command = String.format(commandFormat, tortoiseMergeExe, base, theirs);

                                System.out.println(command);

                                try {
                                    Runtime.getRuntime().exec(command);
                                } catch (IOException e) {
                                    JCommonUtil.handleException(e);
                                }
                            }
                        });
                        newRepList.addKeyListener(new KeyAdapter() {
                            public void keyPressed(KeyEvent evt) {
                                Object[] objects = (Object[]) newRepList.getSelectedValues();
                                if (objects == null || objects.length == 0) {
                                    return;
                                }
                                DefaultListModel model = (DefaultListModel) newRepList.getModel();
                                int lastIndex = model.getSize() - 1;
                                Object swap = null;

                                StringBuilder dsb = new StringBuilder();
                                for (Object current : objects) {
                                    int index = model.indexOf(current);
                                    switch (evt.getKeyCode()) {
                                    case 38:// up
                                        if (index != 0) {
                                            swap = model.getElementAt(index - 1);
                                            model.setElementAt(swap, index);
                                            model.setElementAt(current, index - 1);
                                        }
                                        break;
                                    case 40:// down
                                        if (index != lastIndex) {
                                            swap = model.getElementAt(index + 1);
                                            model.setElementAt(swap, index);
                                            model.setElementAt(current, index + 1);
                                        }
                                        break;
                                    case 127:// del
                                        OldNewFile current_ = (OldNewFile) current;
                                        dsb.append(current_.newFile.getName() + "\t"
                                                + (current_.newFile.delete() ? "T" : "F") + "\n");
                                        current_.newFile.delete();
                                        model.removeElement(current);
                                    }
                                }

                                if (dsb.length() > 0) {
                                    JOptionPaneUtil.newInstance().iconInformationMessage()
                                            .showMessageDialog("del result!\n" + dsb, "DELETE");
                                }
                            }
                        });

                    }
                }
                {
                    replaceOrignFile = new JButton();
                    jPanel4.add(replaceOrignFile, BorderLayout.SOUTH);
                    replaceOrignFile.setText("replace orign file");
                    replaceOrignFile.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            DefaultListModel model = (DefaultListModel) newRepList.getModel();
                            StringBuilder sb = new StringBuilder();
                            for (int ii = 0; ii < model.size(); ii++) {
                                OldNewFile file = (OldNewFile) model.getElementAt(ii);
                                boolean delSuccess = false;
                                boolean renameSuccess = false;
                                if (delSuccess = file.oldFile.delete()) {
                                    renameSuccess = file.newFile.renameTo(file.oldFile);
                                }
                                sb.append(file.oldFile.getName() + " del:" + (delSuccess ? "T" : "F")
                                        + " rename:" + (renameSuccess ? "T" : "F") + "\n");
                            }
                            JOptionPaneUtil.newInstance().iconInformationMessage().showMessageDialog(sb,
                                    getTitle());
                        }
                    });
                }
            }
            {
                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();
                        reloadTemplateList();
                        jScrollPane3.setViewportView(templateList);
                        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);
                            }
                        });
                    }
                }
                {
                    scheduleExecute = new JButton();
                    jPanel5.add(scheduleExecute, BorderLayout.SOUTH);
                    scheduleExecute.setText("schedule execute");
                    scheduleExecute.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            scheduleExecuteActionPerformed(evt);
                        }
                    });
                }
            }
        }
        this.setSize(512, 350);

        JCommonUtil.setFontAll(this.getRootPane());

        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:com.juanhg.pattern.PatternApplet.java

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

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

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

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

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

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

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

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

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

    lblO3 = new JLabel("O3:");
    lblO3.setFont(new Font("Tahoma", Font.PLAIN, 14));

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

    GroupLayout gl_panelOutputs = new GroupLayout(panelOutputs);
    gl_panelOutputs.setHorizontalGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
            .addComponent(panelTitleOutputs, GroupLayout.DEFAULT_SIZE, 344, Short.MAX_VALUE)
            .addGroup(gl_panelOutputs.createSequentialGroup().addGap(22).addGroup(gl_panelOutputs
                    .createParallelGroup(Alignment.LEADING)
                    .addGroup(gl_panelOutputs.createSequentialGroup()
                            .addComponent(lblO3, GroupLayout.PREFERRED_SIZE, 84, GroupLayout.PREFERRED_SIZE)
                            .addGap(26)//w  w w  .jav  a 2 s  .co  m
                            .addComponent(lblO3Value, GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE))
                    .addGroup(gl_panelOutputs.createSequentialGroup()
                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.TRAILING)
                                    .addGroup(gl_panelOutputs.createSequentialGroup()
                                            .addComponent(lblO1, GroupLayout.DEFAULT_SIZE,
                                                    GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addGap(26))
                                    .addGroup(gl_panelOutputs.createSequentialGroup()
                                            .addComponent(lblO2, GroupLayout.PREFERRED_SIZE, 81,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addGap(29)))
                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING, false)
                                    .addComponent(lblO2Value, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(lblO1Value, GroupLayout.PREFERRED_SIZE, 103,
                                            GroupLayout.PREFERRED_SIZE))))
                    .addGap(109)));
    gl_panelOutputs
            .setVerticalGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                    .addGroup(gl_panelOutputs.createSequentialGroup()
                            .addComponent(panelTitleOutputs, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(ComponentPlacement.UNRELATED)
                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(lblO1Value).addComponent(lblO1))
                            .addPreferredGap(ComponentPlacement.UNRELATED)
                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(lblO2, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblO2Value, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(ComponentPlacement.UNRELATED)
                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                                    .addComponent(lblO3, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblO3Value, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE))
                            .addGap(79)));
    panelOutputs.setLayout(gl_panelOutputs);

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

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

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

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

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

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

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

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

    lblI2Value = new JLabel("5");
    lblI2Value.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblI3Value = new JLabel("5");
    lblI3Value.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblI1Value = new JLabel("5");
    lblI1Value.setFont(new Font("Tahoma", Font.PLAIN, 14));

    sliderI1 = new JSlider();
    sliderI1.setMaximum(10);
    sliderI1.setMinorTickSpacing(1);
    sliderI1.setValue(5);
    sliderI1.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent event) {
            sliderI1Event();
        }
    });

    sliderI2 = new JSlider();
    sliderI2.setMaximum(10);
    sliderI2.setMinorTickSpacing(1);
    sliderI2.setValue(5);
    sliderI2.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            sliderI2Event();
        }
    });

    sliderI3 = new JSlider();
    sliderI3.setMaximum(10);
    sliderI3.setValue(5);
    sliderI3.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            sliderI3Event();
        }
    });

    JLabel lblI4 = new JLabel("I4");
    lblI4.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblI4Value = new JLabel("5");
    lblI4Value.setFont(new Font("Tahoma", Font.PLAIN, 14));

    sliderI4 = new JSlider();
    sliderI4.setMaximum(10);
    sliderI4.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent arg0) {
            sliderI4Event();
        }
    });
    sliderI4.setValue(5);
    sliderI4.setMinorTickSpacing(1);

    JLabel lblI5 = new JLabel("I5");
    lblI5.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblI5Value = new JLabel("5");
    lblI5Value.setFont(new Font("Tahoma", Font.PLAIN, 14));

    sliderI5 = new JSlider();
    sliderI5.setMaximum(10);
    sliderI5.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            sliderI5Event();
        }
    });
    sliderI5.setValue(5);
    sliderI5.setMinorTickSpacing(1);

    GroupLayout gl_panelInputs = new GroupLayout(panelInputs);
    gl_panelInputs.setHorizontalGroup(gl_panelInputs.createParallelGroup(Alignment.TRAILING)
            .addGroup(gl_panelInputs.createSequentialGroup().addGroup(gl_panelInputs
                    .createParallelGroup(Alignment.LEADING)
                    .addGroup(gl_panelInputs.createSequentialGroup()
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.TRAILING, false)
                                    .addComponent(labelI3, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(LabelI1, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelI2, Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 120,
                                            GroupLayout.PREFERRED_SIZE))
                            .addGap(18)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                                    .addComponent(lblI1Value, GroupLayout.PREFERRED_SIZE, 42,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblI2Value, GroupLayout.PREFERRED_SIZE, 56,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblI3Value, GroupLayout.PREFERRED_SIZE, 56,
                                            GroupLayout.PREFERRED_SIZE))
                            .addGap(18)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING, false)
                                    .addComponent(sliderI1, 0, 0, Short.MAX_VALUE)
                                    .addComponent(sliderI2, 0, 0, Short.MAX_VALUE).addComponent(
                                            sliderI3, GroupLayout.PREFERRED_SIZE, 88,
                                            GroupLayout.PREFERRED_SIZE)))
                    .addGroup(gl_panelInputs.createSequentialGroup()
                            .addComponent(lblI4, GroupLayout.PREFERRED_SIZE, 120, GroupLayout.PREFERRED_SIZE)
                            .addGap(18)
                            .addComponent(lblI4Value, GroupLayout.PREFERRED_SIZE, 56,
                                    GroupLayout.PREFERRED_SIZE)
                            .addGap(18)
                            .addComponent(sliderI4, GroupLayout.PREFERRED_SIZE, 88, GroupLayout.PREFERRED_SIZE))
                    .addGroup(gl_panelInputs.createSequentialGroup()
                            .addComponent(lblI5, GroupLayout.PREFERRED_SIZE, 120, GroupLayout.PREFERRED_SIZE)
                            .addGap(18)
                            .addComponent(lblI5Value, GroupLayout.PREFERRED_SIZE, 56,
                                    GroupLayout.PREFERRED_SIZE)
                            .addGap(18).addComponent(sliderI5, GroupLayout.PREFERRED_SIZE, 88,
                                    GroupLayout.PREFERRED_SIZE)))
                    .addGap(19))
            .addComponent(panelTitle, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 352, Short.MAX_VALUE));
    gl_panelInputs.setVerticalGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panelInputs.createSequentialGroup()
                    .addComponent(panelTitle, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addGap(18)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(LabelI1).addComponent(lblI1Value, GroupLayout.PREFERRED_SIZE,
                                            17, GroupLayout.PREFERRED_SIZE))
                            .addComponent(sliderI1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(labelI2).addComponent(lblI2Value, GroupLayout.PREFERRED_SIZE,
                                            17, GroupLayout.PREFERRED_SIZE))
                            .addComponent(sliderI2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addGap(11)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING).addComponent(labelI3)
                            .addComponent(lblI3Value, GroupLayout.PREFERRED_SIZE, 17,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(sliderI3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addComponent(lblI4, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblI4Value, GroupLayout.PREFERRED_SIZE, 17,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(sliderI4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addComponent(lblI5, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblI5Value, GroupLayout.PREFERRED_SIZE, 17,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(sliderI5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addGap(429)));

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

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

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

    panel_visualizar.setLayout(gl_panel_visualizar);

    getContentPane().setLayout(groupLayout);
}

From source file:org.xapagy.ui.tempdyn.GraphEvolution.java

/**
 * This function generates a frame into which a number of graphs are
 * arranged horizontally. Each graph describes the time series values for a
 * given in-focus object. We have: the focus (with all the energy colors -
 * salience / energy), the memory (with all the energy colors - salience /
 * energy), and a list of shadows (with all the energy colors - salience /
 * energy)./* w  w w. ja  v a 2  s.  c o m*/
 * 
 * @param tdc
 * @param database
 * @param agent
 * @param index
 *            - the index of time values
 * @param isInstance
 *            - true for instances
 * @param shadowComponents
 *            - how many components will we enter in the graph
 * @param shadowRange
 *            - the range of the y plot on the shadows - needs to be unique.
 * 
 * 
 */
public static void graphFMSComposite(tdComponent tdc, tdDataBase database, Agent agent, List<Double> index,
        int shadowComponents, double shadowRange, GraphEvolutionDescriptor ged) {
    String label = tdc.getLastPrettyPrint();
    // FIXME: this is a tiny bit iffy: we are getting the shadows based on a
    // certain energy color
    String ecx = EnergyColors.SHI_GENERIC;
    List<String> shadowList = database.getShadowComponents(tdc.getIdentifier(), ecx, shadowComponents);
    //
    // ok, now let us create a graph
    //
    JPanel panel = new JPanel();
    // create a layout
    GroupLayout layout = new GroupLayout(panel);
    panel.setLayout(layout);
    layout.setAutoCreateGaps(true);
    layout.setAutoCreateContainerGaps(true);
    SequentialGroup sgv = layout.createSequentialGroup();
    layout.setVerticalGroup(sgv);
    ParallelGroup pgh = layout.createParallelGroup();
    layout.setHorizontalGroup(pgh);
    //
    // the graph with the focus values
    //
    if (ged.graphFocusEnergy || ged.graphFocusSalience) {
        JFreeChart chart = chartFocusEvolution(tdc, label, database, agent, index, ged);
        ChartPanel cp = new ChartPanel(chart);
        sgv.addComponent(cp);
        pgh.addComponent(cp);
    }
    //
    // the graph with the memory values
    //
    if (ged.graphMemoryEnergy || ged.graphMemorySalience) {
        JFreeChart chart = chartMemoryEvolution(tdc, label, database, agent, index, ged);
        ChartPanel cp = new ChartPanel(chart);
        sgv.addComponent(cp);
        pgh.addComponent(cp);
    }
    //
    // the graphs with the shadow components
    //
    if (ged.graphShadowEnergy || ged.graphShadowSalience) {
        for (String sh : shadowList) {
            JFreeChart chart = chartShadowEvolution(tdc, sh, database, agent, index, shadowRange, ged);
            ChartPanel cp = new ChartPanel(chart);
            sgv.addComponent(cp);
            pgh.addComponent(cp);
        }
    }
    JFrame frame = new JFrame();
    frame.add(panel);
    frame.pack();
    frame.setVisible(true);
}