Example usage for javax.swing ButtonGroup ButtonGroup

List of usage examples for javax.swing ButtonGroup ButtonGroup

Introduction

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

Prototype

public ButtonGroup() 

Source Link

Document

Creates a new ButtonGroup.

Usage

From source file:edu.ku.brc.specify.prefs.AttachmentPrefs.java

/**
 * //from   w w  w.  ja v a 2  s  .com
 */
public AttachmentPrefs() {
    super();

    createForm("Preferences", "Attachments");

    PanelViewable pathPanel = form.getCompById("path_panel");
    PanelViewable urlPanel = form.getCompById("url_panel");

    isPublicDefChk = form.getCompById(ATTCH_PUB_DEF);
    pathBrwse = form.getCompById(ATTCH_PATH_ID);
    pathLbl = form.getLabelFor(ATTCH_PATH_ID);
    urlTxt = form.getCompById(ATTCH_URL_ID);
    urlLbl = form.getLabelFor(ATTCH_URL_ID);
    keyTxt = form.getCompById(ATTCH_KEY_ID);
    keyLbl = form.getLabelFor(ATTCH_KEY_ID);

    isInitialized = pathPanel != null && urlPanel != null && pathBrwse != null && pathLbl != null
            && urlTxt != null && urlLbl != null;
    if (!isInitialized) {
        UIRegistry.showError("The form is not setup correctly.");
        return;
    }

    isUsingGlobalAttchPrefs = globalPrefs.getBoolean(USE_GLOBAL_PREFS, false);
    canEditGlobalAttchPrefs = localPrefs.getBoolean(EDT_GLOBAL_PREFS, false);

    UIRegistry.loadAndPushResourceBundle("preferences");
    pathRB = UIHelper.createRadioButton(UIRegistry.getResourceString("USE_ATTACH_PATH"));
    urlRB = UIHelper.createRadioButton(UIRegistry.getResourceString("USE_ATTACH_URL"));
    UIRegistry.popResourceBundle();

    pathRB.setOpaque(false);
    urlRB.setOpaque(false);

    ButtonGroup group = new ButtonGroup();
    group.add(pathRB);
    group.add(urlRB);

    CellConstraints cc = new CellConstraints();
    if (pathPanel != null)
        pathPanel.add(pathRB, cc.xy(1, 1));
    if (urlPanel != null)
        urlPanel.add(urlRB, cc.xy(1, 1));

    JButton saveGGblPrefs = form.getCompById("SaveGGblPrefs");
    JButton clearGGblPrefs = form.getCompById("ClearGGblPrefs");
    if (saveGGblPrefs != null) {
        saveGGblPrefs.setVisible(isUsingGlobalAttchPrefs && canEditGlobalAttchPrefs);
        saveGGblPrefs.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent arg0) {
                oldAttachmentURL = (String) urlTxt.getText().trim();
                oldAttachmentKey = (String) keyTxt.getText().trim();

                globalPrefs.put(ATTACHMENT_PATH, oldAttachmentPath);
                globalPrefs.put(ATTACHMENT_URL, oldAttachmentURL);
                globalPrefs.put(ATTACHMENT_KEY, oldAttachmentKey);
                globalPrefs.putBoolean(ATTACHMENT_USE_PATH, pathRB.isSelected());

                // Make sure local prefs is set for the type we are using.
                localPrefs.putBoolean(ATTACHMENT_USE_PATH, pathRB.isSelected());

                //remotePrefs.putBoolean(ATTCH_PUB_DEF, isPublicDefChk.isSelected());
            }
        });
    }

    if (clearGGblPrefs != null) {
        clearGGblPrefs.setVisible(isUsingGlobalAttchPrefs && canEditGlobalAttchPrefs);
        clearGGblPrefs.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent arg0) {
                globalPrefs.remove(ATTACHMENT_PATH);
                globalPrefs.remove(ATTACHMENT_URL);
                globalPrefs.remove(ATTACHMENT_KEY);
                globalPrefs.remove(ATTACHMENT_USE_PATH);
                try {
                    globalPrefs.flush();
                } catch (BackingStoreException e) {
                    e.printStackTrace();
                }
            }
        });
    }

    if (!isUsingGlobalAttchPrefs || canEditGlobalAttchPrefs) {
        ActionListener al = new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                toggleAttachmentsEnabledState(pathRB.isSelected());
            }
        };
        pathRB.addActionListener(al);
        urlRB.addActionListener(al);
    } else {
        pathBrwse.setEnabled(false);
        urlTxt.setEnabled(false);
        keyTxt.setEnabled(false);
        pathRB.setEnabled(false);
        urlRB.setEnabled(false);
    }

    setDataIntoUI();
}

From source file:net.sf.jabref.importer.fetcher.ACMPortalFetcher.java

@Override
public JPanel getOptionsPanel() {
    JPanel pan = new JPanel();
    pan.setLayout(new GridLayout(0, 1));

    guideButton.setSelected(true);//w ww.j a  va2 s.c o m

    ButtonGroup group = new ButtonGroup();
    group.add(acmButton);
    group.add(guideButton);

    pan.add(absCheckBox);
    pan.add(acmButton);
    pan.add(guideButton);

    return pan;
}

From source file:GUI.GraphicalInterface.java

/**
 * Constructor to initialize GUI components and data members to default
 * value.//from w  ww.j a  va 2s. c  om
 */
public GraphicalInterface() {
    initComponents();

    Platform.init();
    /* Set variables to null */
    m_command = m_history = m_completeCommand = "";
    m_internalPrefix = m_isManualExecution = false;
    m_defaultDescription = "Welcome to Grafcom!\n"
            + "Select a command from the list to view its description. \n"
            + "Descriptions help you learn how commands work, what arguments they require\n"
            + "and what values they return.\n" + "================";
    m_defaultTerminal = ">> Welcome to Grafcom!\n"
            + ">> This is the terminal text area which displays the output \n"
            + "of all the commands you run along with error messages.\n"
            + ">> Select command from drop-down list or enter manually, \n"
            + "click Execute and see the output!\n" + "====================\n";
    terminalJTextArea.setText(m_defaultTerminal);
    descriptionJTextArea.setText(m_defaultDescription);

    m_runtime = Runtime.getRuntime();
    m_description = new Description();
    bg = new ButtonGroup();
    bg.add(listJRadioButton);
    bg.add(manualJRadioButton);

    setFont();
    /* set icon in title bar */
    ImageIcon icon = new ImageIcon("Resources/icon/utilities-terminal.png");
    this.setIconImage(icon.getImage());

    /* Set default execution path and update GUI */
    m_workingDir = new File(System.getProperty("user.dir"));
    workdirJFileChooser.setCurrentDirectory(m_workingDir);
    terminalJTextArea.append("\n" + m_workingDir.getPath() + "> ");

    /* if windows then disable root access */
    rootJCheckBox.setEnabled(OS.isFamilyUnix());

    commandJTextField.setEnabled(false);
    executeManualJButton.setEnabled(false);

    /* set command list */
    commandJComboBox.setModel(new javax.swing.DefaultComboBoxModel(Platform.getCommandList().toArray()));
}

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.//from  w  ww  .  j a va 2  s  . co m
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

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

    jPanel1.setBorder(BorderFactory.createEtchedBorder());

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

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

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

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

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

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

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

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

    jPanel12.setBorder(BorderFactory.createEtchedBorder());

    txtProxyPort.setEnabled(false);

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

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

    jLabel2.setText("Proxy Port");

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

    txtProxyPassword.setEnabled(false);

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

    jLabel3.setText("Username ");

    txtProxyUsername.setEnabled(false);

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

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

    jLabel1.setText("Proxy Host");

    jLabel4.setText("Password");

    txtProxyHost.setEnabled(false);

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

    checkProxyNeedAuth.setText("Proxy Need Authentication");

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

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

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

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

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

    jPanel2.setBorder(BorderFactory.createEtchedBorder());

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

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

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

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

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

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

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

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

    jPanel14.setBorder(BorderFactory.createEtchedBorder());

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

    jLabel6.setText("Default Download Path");

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

    jLabel7.setText("Default Folder Viewer");

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

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

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

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

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

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

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

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

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

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

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

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

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

    jPanel13.setBorder(BorderFactory.createEtchedBorder());

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

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

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

    jLabel9.setText("Total Cache File");

    txtTotalFileSize1.setEditable(false);

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

    txtTotalFileSize.setEditable(false);

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

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

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

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

    jPanel5.setBorder(BorderFactory.createEtchedBorder());

    txtTotalLogSize.setEditable(false);

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

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

    txtTotalLog.setEditable(false);

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

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

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

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

    jPanel6.setBorder(BorderFactory.createEtchedBorder());

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

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

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

    jScrollPane1.setViewportView(txtLogContent);

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

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

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

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

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

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

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

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

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

    jPanel15.setBorder(BorderFactory.createEtchedBorder());

    txtAppLookAndFeel.setEditable(false);

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

    jLabel10.setText("Look And Feel ");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    bindingGroup.bind();
}

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

private void initGUI() {
    try {/*from  ww  w  . j  a  v a2 s  .  co  m*/
        BorderLayout thisLayout = new BorderLayout();
        getContentPane().setLayout(thisLayout);
        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("", null, jPanel1, null);
                {
                    jScrollPane3 = new JScrollPane();
                    jPanel1.add(jScrollPane3, BorderLayout.CENTER);
                    jScrollPane3.setPreferredSize(new java.awt.Dimension(379, 209));
                    {
                        replaceBeforeArea = new JTextArea();
                        jScrollPane3.setViewportView(replaceBeforeArea);
                    }
                }
                {
                    jPanel3 = new JPanel();
                    jPanel1.add(jPanel3, BorderLayout.NORTH);
                    jPanel3.setPreferredSize(new java.awt.Dimension(379, 28));
                    {
                        dbToJavaRadio = new JRadioButton();
                        jPanel3.add(dbToJavaRadio);
                        dbToJavaRadio.setText("DB->Java");
                    }
                    {
                        javaToDbRadio = new JRadioButton();
                        jPanel3.add(javaToDbRadio);
                        javaToDbRadio.setText("Java->DB");
                    }
                }
            }
            {
                jPanel2 = new JPanel();
                BorderLayout jPanel2Layout = new BorderLayout();
                jPanel2.setLayout(jPanel2Layout);
                jTabbedPane1.addTab("??", null, jPanel2, null);
                {
                    jScrollPane1 = new JScrollPane();
                    jPanel2.add(jScrollPane1, BorderLayout.CENTER);
                    jScrollPane1.setPreferredSize(new java.awt.Dimension(379, 233));
                    {
                        jScrollPane2 = new JScrollPane();
                        jScrollPane1.setViewportView(jScrollPane2);
                        jScrollPane2.setPreferredSize(new java.awt.Dimension(376, 230));
                        {
                            replaceAfterArea = new JTextArea();
                            jScrollPane2.setViewportView(replaceAfterArea);
                        }
                    }
                }
            }
            {
                jPanel4 = new JPanel();
                BorderLayout jPanel4Layout = new BorderLayout();
                jPanel4.setLayout(jPanel4Layout);
                jTabbedPane1.addTab("setter", null, jPanel4, null);
                {
                    jScrollPane4 = new JScrollPane();
                    jPanel4.add(jScrollPane4, BorderLayout.CENTER);
                    jScrollPane4.setPreferredSize(new java.awt.Dimension(379, 233));
                    {
                        getSetRelArea = new JTextArea();
                        jScrollPane4.setViewportView(getSetRelArea);
                    }
                }
            }
        }
        buttonGroup1 = new ButtonGroup();
        buttonGroup1.add(dbToJavaRadio);
        dbToJavaRadio.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                System.out.println("dbToJavaRadio.actionPerformed, event=" + evt);
                //TODO add your code for dbToJavaRadio.actionPerformed
                execute(DbJava.DB_TO_JAVA);
            }
        });
        buttonGroup1.add(javaToDbRadio);
        javaToDbRadio.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                System.out.println("javaToDbRadio.actionPerformed, event=" + evt);
                //TODO add your code for javaToDbRadio.actionPerformed
                execute(DbJava.JAVA_TO_DB);
            }
        });
        pack();
        setSize(400, 300);
    } catch (Exception e) {
        //add your error handling code here
        e.printStackTrace();
    }
}

From source file:de.fhg.iais.asc.ui.parts.TransformersPanel.java

private JPanel createSelectTransformersRadioGroup() {
    this.localTransformersRadioButton = LocalizedUI.createRadioButton("Transform.UseLocalScripts"); //$NON-NLS-1$
    this.localTransformersRadioButton.setSelected(true);
    this.remoteTransformersRadioButton = LocalizedUI.createRadioButton("Transform.UseRemoteScripts"); //$NON-NLS-1$

    // You've to remove this if the transformer scripts presenting server is enabled.
    this.remoteTransformersRadioButton.setEnabled(false);

    // Group the radio buttons.
    ButtonGroup group = new ButtonGroup();
    group.add(this.localTransformersRadioButton);
    group.add(this.remoteTransformersRadioButton);

    JPanel tranformersInnerPanel = new JPanel(new GridLayout(2, 1));

    this.localTransformersRadioButton.addActionListener(new ActionListener() {
        @Override/*  w  ww. j  a v a2 s .co m*/
        public void actionPerformed(ActionEvent e) {
            if (TransformersPanel.this.localTransformersRadioButton.isSelected()) {
                TransformersPanel.this.myCortexModel.getConfig().put(AscConfiguration.TRANSFORMERS_URL,
                        DEFAULT_TRANSFORMER_URL);
            }
        }
    });
    this.remoteTransformersRadioButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            if (TransformersPanel.this.remoteTransformersRadioButton.isSelected()) {
                // get the frame the panel is embedded in
                Component currentComponent = TransformersPanel.this;
                while (currentComponent.getParent() != null && !(currentComponent instanceof JFrame)) {
                    currentComponent = currentComponent.getParent();
                }
                final JFrame parentFrame = currentComponent instanceof JFrame ? (JFrame) currentComponent
                        : null;

                (new TransformationURLWindow(parentFrame, TransformersPanel.this.myCortexModel.getConfig()))
                        .setVisible(true);
                if (TransformersPanel.this.myCortexModel.getConfig()
                        .get(AscConfiguration.TRANSFORMERS_URL, DEFAULT_TRANSFORMER_URL)
                        .equals(DEFAULT_TRANSFORMER_URL)) {
                    TransformersPanel.this.remoteTransformersRadioButton.setSelected(false);
                    TransformersPanel.this.localTransformersRadioButton.setSelected(true);
                }
            }
        }
    });

    tranformersInnerPanel.add(this.localTransformersRadioButton);
    tranformersInnerPanel.add(this.remoteTransformersRadioButton);
    return tranformersInnerPanel;
}

From source file:edu.ku.brc.af.ui.forms.formatters.DataObjFieldFormatDlg.java

@Override
public void createUI() {
    super.createUI();

    JLabel titleLbl = createLabel(getResourceString("DOF_TITLE") + ":");
    titleText = createTextField(32);//  w  w w  .j a  va 2  s. c o m

    JLabel nameLbl = createLabel(getResourceString("DOF_NAME") + ":");
    nameText = createTextField(32);

    // radio buttons (single/multiple/external object display formats
    JLabel typeLbl = createLabel(getResourceString("DOF_TYPE") + ":");
    singleDisplayBtn = createRadioButton(getResourceString("DOF_SINGLE"));
    multipleDisplayBtn = createRadioButton(getResourceString("DOF_MULTIPLE") + ":");
    singleDisplayBtn.setSelected(true);

    CellConstraints cc = new CellConstraints();

    if (dataObjFormatter.getFormatters().size() == 1) {
        DataObjDataFieldFormatIFace dof = dataObjFormatter.getFormatters().iterator().next();
        if (dof.isCustom()) {
            if (dof.hasEditor()) {
                customEditor = dof.getCustomEditor(new ChangeListener() {
                    @Override
                    public void stateChanged(ChangeEvent e) {
                        setHasChanged(true);
                    }
                });
            } else {
                isEditable = false;
                UIRegistry.showLocalizedMsg("DOF_NO_CST_EDT");
                return;
            }
        }
    }

    if (customEditor == null) {
        ButtonGroup displayTypeGrp = new ButtonGroup();
        displayTypeGrp.add(singleDisplayBtn);
        displayTypeGrp.add(multipleDisplayBtn);
        addDisplayTypeRadioButtonListeners();

        // combo box that lists fields that can be selected when multiple
        // display radio button is selected
        DefaultComboBoxModel cboModel = new DefaultComboBoxModel();
        valueFieldCbo = createComboBox(cboModel);
        addValueFieldsToCombo(null);
        addValueFieldCboAL();

        // little panel to hold multiple display radio button and its combo box
        PanelBuilder multipleDisplayPB = new PanelBuilder(new FormLayout("l:p,f:p:g", "p"));
        multipleDisplayPB.add(multipleDisplayBtn, cc.xy(1, 1));
        multipleDisplayPB.add(valueFieldCbo, cc.xy(2, 1));

        // format editing panels (dependent on the type for format: single/multiple)
        DataObjSwitchFormatterContainerIface formatterContainer = new DataObjSwitchFormatterSingleContainer(
                dataObjFormatter);
        fmtSingleEditingPanel = new DataObjFieldFormatSinglePanel(tableInfo, formatterContainer,
                dataObjFieldFormatMgrCache, uiFieldFormatterMgrCache, this, getOkBtn());
        fmtMultipleEditingPanel = new DataObjFieldFormatMultiplePanel(tableInfo, formatterContainer,
                dataObjFieldFormatMgrCache, uiFieldFormatterMgrCache, this, getOkBtn());

        // Panel for radio buttons and display formatting editing panel
        PanelBuilder pb = new PanelBuilder(new FormLayout("r:p,4px,f:p:g", "p,2px,p,10px,p,p,10px,f:p:g"));

        int y = 1;
        pb.add(nameLbl, cc.xy(1, y));
        pb.add(nameText, cc.xy(3, y));
        y += 2;

        pb.add(titleLbl, cc.xy(1, y));
        pb.add(titleText, cc.xy(3, y));
        y += 2;

        pb.add(typeLbl, cc.xy(1, y));
        pb.add(singleDisplayBtn, cc.xy(3, y));
        y += 1;
        pb.add(multipleDisplayPB.getPanel(), cc.xy(3, y));
        y += 2;

        // both panels occupy the same space
        pb.add(fmtSingleEditingPanel, cc.xyw(1, y, 3));
        pb.add(fmtMultipleEditingPanel, cc.xyw(1, y, 3));

        pb.setDefaultDialogBorder();

        contentPanel = pb.getPanel();

    } else {
        PanelBuilder pb = new PanelBuilder(new FormLayout("r:p,4px,f:p:g", "p,6px,p,2px,p,4px,p,10px"));

        int y = 1;
        pb.addSeparator(getResourceString("DOF_CST_ED"), cc.xyw(1, y, 3));
        y += 2;

        pb.add(nameLbl, cc.xy(1, y));
        pb.add(nameText, cc.xy(3, y));
        y += 2;

        pb.add(titleLbl, cc.xy(1, y));
        pb.add(titleText, cc.xy(3, y));
        y += 2;

        String labelStr = dataObjFormatter.getFormatters().iterator().next().getLabel();
        if (StringUtils.isNotEmpty(labelStr)) {
            pb.add(UIHelper.createFormLabel(labelStr), cc.xy(1, y));
            pb.add(customEditor, cc.xy(3, y));
            y += 2;

        } else {
            pb.add(customEditor, cc.xyw(1, y, 3));
            y += 2;
        }

        pb.setDefaultDialogBorder();

        contentPanel = pb.getPanel();
    }

    mainPanel.add(contentPanel, BorderLayout.CENTER);

    // after all is created, set initial selection on format list
    fillWithObjFormatter(dataObjFormatter, true);

    // title text field
    DocumentAdaptor nameChangedDL = new DocumentAdaptor() {
        @Override
        protected void changed(DocumentEvent ev) {
            String name = nameText.getText();
            String title = titleText.getText();

            isInError = (StringUtils.isEmpty(name)
                    || dataObjFieldFormatMgrCache.getDataFormatter(name) != null);

            dataObjFormatter.setName(name);
            dataObjFormatter.setTitle(title);

            setHasChanged(true);
        }
    };

    titleText.getDocument().addDocumentListener(nameChangedDL);
    nameText.getDocument().addDocumentListener(nameChangedDL);

    updateUIEnabled();

    packWithLargestPanel();
}

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

/** This method is called from within the constructor to
 * initialize the form.//from   www .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();
    buttonTambah = 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)); // NOI18N
    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");

    buttonTambah.setMnemonic('T');
    buttonTambah.setText("Tambah");

    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(textKode, 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))
                            .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(buttonTambah, 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))
            .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(buttonTambah, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addContainerGap()));
}

From source file:au.org.ala.delta.intkey.ui.FindInTaxaDialog.java

public FindInTaxaDialog(Intkey intkeyApp) {
    super(intkeyApp.getMainFrame(), false);
    setResizable(false);// w  w w. j a  v a 2  s .c o m

    ResourceMap resourceMap = Application.getInstance().getContext().getResourceMap(FindInTaxaDialog.class);
    resourceMap.injectFields(this);
    ActionMap actionMap = Application.getInstance().getContext().getActionMap(this);

    _intkeyApp = intkeyApp;

    _numMatchedTaxa = 0;
    _currentMatchedTaxon = -1;

    _findAction = actionMap.get("findTaxa");
    _nextAction = actionMap.get("nextFoundTaxon");

    this.setTitle(windowTitle);

    getContentPane().setLayout(new BorderLayout(0, 0));

    _pnlMain = new JPanel();
    _pnlMain.setBorder(new EmptyBorder(20, 20, 20, 20));
    getContentPane().add(_pnlMain, BorderLayout.CENTER);
    _pnlMain.setLayout(new BorderLayout(0, 0));

    _pnlMainTop = new JPanel();
    _pnlMain.add(_pnlMainTop, BorderLayout.NORTH);
    _pnlMainTop.setLayout(new BoxLayout(_pnlMainTop, BoxLayout.Y_AXIS));

    _lblEnterSearchString = new JLabel(enterSearchStringCaption);
    _lblEnterSearchString.setBorder(new EmptyBorder(0, 0, 5, 0));
    _lblEnterSearchString.setHorizontalAlignment(SwingConstants.LEFT);
    _lblEnterSearchString.setVerticalAlignment(SwingConstants.TOP);
    _lblEnterSearchString.setAlignmentY(Component.TOP_ALIGNMENT);
    _pnlMainTop.add(_lblEnterSearchString);

    _textField = new JTextField();
    _textField.getDocument().addDocumentListener(new DocumentListener() {

        @Override
        public void removeUpdate(DocumentEvent e) {
            reset();
        }

        @Override
        public void insertUpdate(DocumentEvent e) {
            reset();
        }

        @Override
        public void changedUpdate(DocumentEvent e) {
            reset();
        }
    });

    _pnlMainTop.add(_textField);
    _textField.setColumns(10);

    _pnlMainMiddle = new JPanel();
    _pnlMainMiddle.setBorder(new EmptyBorder(10, 0, 0, 0));
    _pnlMain.add(_pnlMainMiddle, BorderLayout.CENTER);
    _pnlMainMiddle.setLayout(new BoxLayout(_pnlMainMiddle, BoxLayout.Y_AXIS));

    _rdbtnSelectOne = new JRadioButton(selectOneCaption);
    _rdbtnSelectOne.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            reset();
        }
    });
    _pnlMainMiddle.add(_rdbtnSelectOne);

    _rdbtnSelectAll = new JRadioButton(selectAllCaption);
    _rdbtnSelectAll.setSelected(true);
    _rdbtnSelectAll.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            reset();
        }
    });
    _pnlMainMiddle.add(_rdbtnSelectAll);

    ButtonGroup radioButtonGroup = new ButtonGroup();
    radioButtonGroup.add(_rdbtnSelectOne);
    radioButtonGroup.add(_rdbtnSelectAll);

    _pnlMainBottom = new JPanel();
    _pnlMain.add(_pnlMainBottom, BorderLayout.SOUTH);
    _pnlMainBottom.setLayout(new BoxLayout(_pnlMainBottom, BoxLayout.Y_AXIS));

    _chckbxSearchSynonyms = new JCheckBox(searchSynonymsCaption);
    _chckbxSearchSynonyms.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            reset();
        }
    });

    _pnlMainBottom.add(_chckbxSearchSynonyms);

    _chckbxSearchEliminatedTaxa = new JCheckBox(searchEliminatedTaxaCaption);
    _chckbxSearchEliminatedTaxa.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            reset();
        }
    });

    _pnlMainBottom.add(_chckbxSearchEliminatedTaxa);

    _pnlButtons = new JPanel();
    _pnlButtons.setBorder(new EmptyBorder(20, 0, 0, 10));
    getContentPane().add(_pnlButtons, BorderLayout.EAST);
    _pnlButtons.setLayout(new BorderLayout(0, 0));

    _pnlInnerButtons = new JPanel();
    _pnlButtons.add(_pnlInnerButtons, BorderLayout.NORTH);
    GridBagLayout gbl_pnlInnerButtons = new GridBagLayout();
    gbl_pnlInnerButtons.columnWidths = new int[] { 0, 0 };
    gbl_pnlInnerButtons.rowHeights = new int[] { 0, 0, 0, 0 };
    gbl_pnlInnerButtons.columnWeights = new double[] { 0.0, Double.MIN_VALUE };
    gbl_pnlInnerButtons.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    _pnlInnerButtons.setLayout(gbl_pnlInnerButtons);

    _btnFindNext = new JButton();
    _btnFindNext.setAction(_findAction);
    GridBagConstraints gbc_btnFind = new GridBagConstraints();
    gbc_btnFind.fill = GridBagConstraints.HORIZONTAL;
    gbc_btnFind.insets = new Insets(0, 0, 5, 0);
    gbc_btnFind.gridx = 0;
    gbc_btnFind.gridy = 0;
    _pnlInnerButtons.add(_btnFindNext, gbc_btnFind);

    _btnPrevious = new JButton();
    _btnPrevious.setAction(actionMap.get("previousFoundTaxon"));
    _btnPrevious.setEnabled(false);
    GridBagConstraints gbc_btnPrevious = new GridBagConstraints();
    gbc_btnPrevious.insets = new Insets(0, 0, 5, 0);
    gbc_btnPrevious.gridx = 0;
    gbc_btnPrevious.gridy = 1;
    _pnlInnerButtons.add(_btnPrevious, gbc_btnPrevious);

    _btnDone = new JButton();
    _btnDone.setAction(actionMap.get("findTaxaDone"));
    GridBagConstraints gbc_btnDone = new GridBagConstraints();
    gbc_btnDone.fill = GridBagConstraints.HORIZONTAL;
    gbc_btnDone.gridx = 0;
    gbc_btnDone.gridy = 2;
    _pnlInnerButtons.add(_btnDone, gbc_btnDone);

    this.pack();
    this.setLocationRelativeTo(_intkeyApp.getMainFrame());
}

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

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

    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();
    textTelepon = new TextBoxTransfer();
    labelTelepon = new WhiteLabel();
    labelEmail = new WhiteLabel();
    labelJenisKelamin = new WhiteLabel();
    labelPhoto = new WhiteLabel();
    textEmail = new TextBoxTransfer();
    radioPria = new JRadioButton();
    radioWanita = new JRadioButton();
    imageChooser = new ImageChooser();
    buttonBatal = new Button();
    buttonHapus = 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 :");

    textNama.setEnabled(false);

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

    textAlamat.setEnabled(false);

    textTelepon.setEnabled(false);

    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 :");

    textEmail.setEnabled(false);

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

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

    imageChooser.setEnabled(false);

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

    buttonHapus.setMnemonic('H');
    buttonHapus.setText("Hapus");

    buttonCari.setText("Cari");

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
            layout.createParallelGroup(Alignment.LEADING)
                    .addGroup(
                            Alignment.TRAILING, layout
                                    .createSequentialGroup().addContainerGap().addGroup(layout
                                            .createParallelGroup(Alignment.TRAILING).addGroup(layout
                                                    .createSequentialGroup().addComponent(
                                                            buttonHapus, GroupLayout.PREFERRED_SIZE,
                                                            GroupLayout.DEFAULT_SIZE,
                                                            GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(
                                                            buttonBatal, GroupLayout.PREFERRED_SIZE,
                                                            GroupLayout.DEFAULT_SIZE,
                                                            GroupLayout.PREFERRED_SIZE))
                                            .addGroup(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,
                                                                    GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                            .addComponent(textNama, Alignment.LEADING,
                                                                    GroupLayout.DEFAULT_SIZE, 552,
                                                                    Short.MAX_VALUE)
                                                            .addComponent(textTanggalLahir, Alignment.LEADING,
                                                                    GroupLayout.DEFAULT_SIZE, 552,
                                                                    Short.MAX_VALUE)
                                                            .addComponent(textTelepon, GroupLayout.DEFAULT_SIZE,
                                                                    552, 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,
                                                                    552, Short.MAX_VALUE)
                                                            .addGroup(layout.createSequentialGroup()
                                                                    .addComponent(textKode,
                                                                            GroupLayout.DEFAULT_SIZE, 488,
                                                                            Short.MAX_VALUE)
                                                                    .addPreferredGap(
                                                                            ComponentPlacement.UNRELATED)
                                                                    .addComponent(buttonCari,
                                                                            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(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))
            .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))
            .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))
            .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))
            .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))
            .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(buttonHapus, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addContainerGap()));
}