Example usage for com.jgoodies.forms.factories CC xy

List of usage examples for com.jgoodies.forms.factories CC xy

Introduction

In this page you can find the example usage for com.jgoodies.forms.factories CC xy.

Prototype

public static CellConstraints xy(int col, int row) 

Source Link

Document

Sets column and row origins; sets width and height to 1; uses the default alignments.

Examples:

 CC.xy(1, 1); CC.xy(1, 3); 

Usage

From source file:Tree1.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Roman Boiko
    panel1 = new JPanel();
    JButton Zakaz = new JButton();

    //======== this ========
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout("23*(default, $lcgap), default", "15*(default, $lgap), default"));

    //======== panel1 ========
    {/*w ww.  j a  va 2 s.  c  o  m*/

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

        panel1.setLayout(new FormLayout("8*(default, $lcgap), default", "2*(default, $lgap), default"));

        //---- Zakaz ----
        Zakaz.setText("text");
        Zakaz.addActionListener(e -> ZakazActionPerformed(e));
        panel1.add(Zakaz, CC.xywh(1, 1, 17, 5));
    }
    contentPane.add(panel1, CC.xy(19, 9));
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:EditAutoWatchView.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    panel1 = new JPanel();
    userInputPanel = new JPanel();
    profileNameText = new JTextField();
    addButton = new JButton();
    separator1 = new JSeparator();
    label7 = new JLabel();
    watchListPanel = new JPanel();
    watch1Label = new JLabel();
    deleteWatch1Button = new JButton();
    watch2Label = new JLabel();
    deleteWatch2Button = new JButton();
    watch3Label = new JLabel();
    deleteWatch3Button = new JButton();
    watch4Label = new JLabel();
    deleteWatch4Button = new JButton();
    watch5Label = new JLabel();
    deleteWatch5Button = new JButton();
    separator2 = new JSeparator();
    buttonPanel = new JPanel();
    closeButton = new JButton();
    clearButton = new JButton();

    //======== this ========
    setTitle("Watched Profiles");
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout("100dlu, $lcgap, default", "148dlu:grow"));

    //======== panel1 ========
    {//from ww  w.  j a  va 2  s. c  om
        panel1.setPreferredSize(new Dimension(200, 240));
        panel1.setLayout(new FormLayout("left:97dlu", "fill:min, 2*(default), $lgap, min, 8dlu, 20dlu"));

        //======== userInputPanel ========
        {
            userInputPanel.setName("userInputPanel");
            userInputPanel.setPreferredSize(new Dimension(250, 150));
            userInputPanel.setLayout(new FormLayout("left:55dlu, 31dlu", "default"));

            //---- profileNameText ----
            profileNameText.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
            profileNameText.setName("profilename");
            profileNameText.setPreferredSize(new Dimension(100, 25));
            profileNameText.addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent e) {
                    profileNameTextKeyReleased(e);
                }
            });
            userInputPanel.add(profileNameText, CC.xy(1, 1));

            //---- addButton ----
            addButton.setText("Add");
            addButton.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
            addButton.setName("addButton");
            addButton.setEnabled(false);
            addButton.setPreferredSize(new Dimension(50, 20));
            addButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    addButtonActionPerformed(e);
                }
            });
            userInputPanel.add(addButton,
                    new CellConstraints(2, 1, 1, 1, CC.LEFT, CC.DEFAULT, new Insets(0, 5, 0, 0)));
        }
        panel1.add(userInputPanel, CC.xy(1, 1));
        panel1.add(separator1, CC.xy(1, 2, CC.FILL, CC.DEFAULT));

        //---- label7 ----
        label7.setText("Watched Profiles");
        panel1.add(label7, new CellConstraints(1, 3, 1, 1, CC.DEFAULT, CC.DEFAULT, new Insets(0, 5, 0, 0)));

        //======== watchListPanel ========
        {
            watchListPanel.setName("watchListPanel");
            watchListPanel.setPreferredSize(new Dimension(200, 160));
            watchListPanel.setLayout(new FormLayout("55dlu:grow, 45dlu",
                    "14dlu, $nlgap, 14dlu, $lcgap, 2*(14dlu, $nlgap), 14dlu"));

            //---- watch1Label ----
            watch1Label.setFont(new Font("Lucida Grande", Font.ITALIC, 12));
            watch1Label.setName("watch1");
            watchListPanel.add(watch1Label, CC.xy(1, 1));

            //---- deleteWatch1Button ----
            deleteWatch1Button.setText("Delete");
            deleteWatch1Button.setPreferredSize(new Dimension(50, 20));
            deleteWatch1Button.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
            deleteWatch1Button.setName("deleteWatch1Button");
            deleteWatch1Button.setVisible(false);
            deleteWatch1Button.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    deleteWatch1ButtonActionPerformed(e);
                }
            });
            watchListPanel.add(deleteWatch1Button,
                    new CellConstraints(2, 1, 1, 1, CC.LEFT, CC.DEFAULT, new Insets(0, 5, 0, 0)));

            //---- watch2Label ----
            watch2Label.setFont(new Font("Lucida Grande", Font.ITALIC, 12));
            watch2Label.setName("watch2");
            watchListPanel.add(watch2Label, CC.xy(1, 3));

            //---- deleteWatch2Button ----
            deleteWatch2Button.setText("Delete");
            deleteWatch2Button.setPreferredSize(new Dimension(50, 20));
            deleteWatch2Button.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
            deleteWatch2Button.setName("deleteWatch2Button");
            deleteWatch2Button.setVisible(false);
            deleteWatch2Button.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    deleteWatch2ButtonActionPerformed(e);
                }
            });
            watchListPanel.add(deleteWatch2Button,
                    new CellConstraints(2, 3, 1, 1, CC.LEFT, CC.DEFAULT, new Insets(0, 5, 0, 0)));

            //---- watch3Label ----
            watch3Label.setFont(new Font("Lucida Grande", Font.ITALIC, 12));
            watch3Label.setName("watch3");
            watchListPanel.add(watch3Label, CC.xy(1, 5));

            //---- deleteWatch3Button ----
            deleteWatch3Button.setText("Delete");
            deleteWatch3Button.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
            deleteWatch3Button.setPreferredSize(new Dimension(50, 20));
            deleteWatch3Button.setName("deleteWatch3Button");
            deleteWatch3Button.setVisible(false);
            deleteWatch3Button.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    deleteWatch3ButtonActionPerformed(e);
                }
            });
            watchListPanel.add(deleteWatch3Button,
                    new CellConstraints(2, 5, 1, 1, CC.LEFT, CC.DEFAULT, new Insets(0, 5, 0, 0)));

            //---- watch4Label ----
            watch4Label.setFont(new Font("Lucida Grande", Font.ITALIC, 12));
            watch4Label.setName("watch4");
            watchListPanel.add(watch4Label, CC.xy(1, 7));

            //---- deleteWatch4Button ----
            deleteWatch4Button.setText("Delete");
            deleteWatch4Button.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
            deleteWatch4Button.setPreferredSize(new Dimension(50, 20));
            deleteWatch4Button.setName("deleteWatch4Button");
            deleteWatch4Button.setVisible(false);
            deleteWatch4Button.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    deleteWatch4ButtonActionPerformed(e);
                }
            });
            watchListPanel.add(deleteWatch4Button,
                    new CellConstraints(2, 7, 1, 1, CC.LEFT, CC.DEFAULT, new Insets(0, 5, 0, 0)));

            //---- watch5Label ----
            watch5Label.setFont(new Font("Lucida Grande", Font.ITALIC, 12));
            watch5Label.setName("watch5");
            watchListPanel.add(watch5Label, CC.xy(1, 9));

            //---- deleteWatch5Button ----
            deleteWatch5Button.setText("Delete");
            deleteWatch5Button.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
            deleteWatch5Button.setPreferredSize(new Dimension(50, 20));
            deleteWatch5Button.setName("deleteWatch5Button");
            deleteWatch5Button.setVisible(false);
            deleteWatch5Button.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    deleteWatch5ButtonActionPerformed(e);
                }
            });
            watchListPanel.add(deleteWatch5Button,
                    new CellConstraints(2, 9, 1, 1, CC.LEFT, CC.DEFAULT, new Insets(0, 5, 0, 0)));
        }
        panel1.add(watchListPanel, new CellConstraints(1, 5, 1, 1, CC.DEFAULT, CC.TOP, new Insets(0, 5, 0, 0)));
        panel1.add(separator2, CC.xy(1, 6, CC.FILL, CC.DEFAULT));

        //======== buttonPanel ========
        {
            buttonPanel.setLayout(new FormLayout("default, 3dlu, default, $lcgap, default", "default"));

            //---- closeButton ----
            closeButton.setText("Close");
            closeButton.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
            closeButton.setName("closeButton");
            closeButton.setPreferredSize(new Dimension(50, 20));
            closeButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    closeButtonActionPerformed(e);
                }
            });
            buttonPanel.add(closeButton, CC.xy(1, 1));

            //---- clearButton ----
            clearButton.setText("Clear");
            clearButton.setPreferredSize(new Dimension(50, 20));
            clearButton.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
            clearButton.setName("clearButton");
            clearButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    clearButtonActionPerformed(e);
                }
            });
            buttonPanel.add(clearButton, CC.xy(3, 1));
        }
        panel1.add(buttonPanel, CC.xy(1, 7, CC.FILL, CC.FILL));
    }
    contentPane.add(panel1, new CellConstraints(1, 1, 1, 1, CC.DEFAULT, CC.TOP, new Insets(5, 5, 0, 0)));
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:CheckProfileView.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    panel1 = new JPanel();
    profileNameText = new JTextField();
    goButton = new JButton();

    //======== this ========
    setTitle("Enter Profile Name");
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout("default, $lcgap, default", "default"));

    //======== panel1 ========
    {//from   w  w w  .j a v  a  2  s.co m
        panel1.setLayout(new FormLayout("64dlu, $lcgap, default", "default"));

        //---- profileNameText ----
        profileNameText.setName("profileNameText");
        panel1.add(profileNameText, CC.xy(1, 1));

        //---- goButton ----
        goButton.setText("Go");
        goButton.setName("goButton");
        goButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                goButtonActionPerformed(e);
            }
        });
        panel1.add(goButton, CC.xy(3, 1));
    }
    contentPane.add(panel1, CC.xy(1, 1));
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:ClientLoginGUI.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Austin Seber
    clientLoginGUI = new JPanel();
    contentPanel = new JPanel();
    usernameTextField = new JTextField();
    passwordTextField = new JPasswordField();
    saveLoginInformationCheckBox = new JCheckBox();
    buttonBar = new JPanel();
    notificationTextField = new JTextField();
    loginButton = new JButton();
    cancelButton = new JButton();

    //======== this ========
    setTitle("Login to server");
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== clientLoginGUI ========
    {/*  www  .j  ava 2s. c om*/
        clientLoginGUI.setBorder(Borders.DIALOG_BORDER);

        clientLoginGUI.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout("132dlu, $lcgap, 107dlu", "2*(default, $lgap), default"));

            //---- usernameTextField ----
            usernameTextField.setBorder(new TitledBorder(null, "Username", TitledBorder.LEADING,
                    TitledBorder.DEFAULT_POSITION, null, Color.black));
            usernameTextField.setBackground(new Color(240, 240, 240));
            usernameTextField.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
            usernameTextField.setAction(null);
            contentPanel.add(usernameTextField, CC.xywh(1, 1, 3, 1));
            usernameTextField.addKeyListener(new KeyListener() {

                @Override
                public void keyPressed(KeyEvent key) {

                    if (key.getKeyCode() == KeyEvent.VK_ENTER) {

                        loginButtonMouseClicked();

                    }

                    if (key.getKeyCode() == KeyEvent.VK_ESCAPE) {

                        cancelButtonMouseClicked();

                    }

                }

                @Override
                public void keyReleased(KeyEvent arg0) {
                }

                @Override
                public void keyTyped(KeyEvent arg0) {
                }

            });

            //---- passwordTextField ----
            passwordTextField.setBorder(new TitledBorder("Password"));
            passwordTextField.setBackground(new Color(240, 240, 240));
            contentPanel.add(passwordTextField, CC.xywh(1, 3, 3, 1));
            passwordTextField.addKeyListener(new KeyListener() {

                @Override
                public void keyPressed(KeyEvent key) {

                    if (key.getKeyCode() == KeyEvent.VK_ENTER) {

                        loginButtonMouseClicked();

                    }

                    if (key.getKeyCode() == KeyEvent.VK_ESCAPE) {

                        cancelButtonMouseClicked();

                    }

                }

                @Override
                public void keyReleased(KeyEvent arg0) {
                }

                @Override
                public void keyTyped(KeyEvent arg0) {
                }

            });

            //---- saveLoginInformationCheckBox ----
            saveLoginInformationCheckBox.setText("Save login information");
            saveLoginInformationCheckBox.setBorder(new LineBorder(new Color(0, 0, 0, 0), 2));
            contentPanel.add(saveLoginInformationCheckBox, CC.xy(3, 5));
        }
        clientLoginGUI.add(contentPanel, BorderLayout.NORTH);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            buttonBar.setLayout(
                    new FormLayout("$lcgap, default, $glue, $lcgap, default, $button, $rgap, $button", "pref"));

            //---- notificationTextField ----
            notificationTextField.setBackground(new Color(240, 240, 240));
            notificationTextField.setBorder(new LineBorder(new Color(0, 0, 0, 0), 2));
            notificationTextField.setEditable(false);
            buttonBar.add(notificationTextField, CC.xywh(2, 1, 3, 1));

            //---- loginButton ----
            loginButton.setText("Login");
            loginButton.addActionListener(new ActionListener() {

                @Override
                public void actionPerformed(ActionEvent e) {

                    loginButtonMouseClicked();

                }

            });
            buttonBar.add(loginButton, CC.xy(6, 1));

            //---- cancelButton ----
            cancelButton.setText("Cancel");
            cancelButton.addActionListener(new ActionListener() {

                @Override
                public void actionPerformed(ActionEvent e) {

                    cancelButtonMouseClicked();

                }

            });
            buttonBar.add(cancelButton, CC.xy(8, 1));
        }
        clientLoginGUI.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(clientLoginGUI, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents

    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    loginButton.setFocusable(false);
    //loginButton.setMnemonic(KeyEvent.VK_ENTER);
    cancelButton.setFocusable(false);
    //cancelButton.setMnemonic(KeyEvent.VK_ESCAPE);

}

From source file:DecoderForm.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - sed sed
    selectFileButton = new JButton();
    selectFileText = new JTextField();
    outputDirectory = new JButton();
    outputDirectoryText = new JTextField();
    label2 = new JLabel();
    scrollPane1 = new JScrollPane();
    keywordsArea = new JTextArea();
    startButton = new JButton();

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

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

    setLayout(new FormLayout("default, $lcgap, 82dlu, $lcgap, default, $lcgap, 135dlu",
            "7*(default, $lgap), 38dlu, 3*($lgap, default)"));

    //---- selectFileButton ----
    selectFileButton.setText("Select file");
    selectFileButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            selectFileButtonClick(e);
        }
    });
    add(selectFileButton, CC.xywh(3, 5, 2, 1));
    add(selectFileText, CC.xy(7, 5));

    //---- outputDirectory ----
    outputDirectory.setText("Output directory");
    outputDirectory.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            outputDirectoryClick(e);
        }
    });
    add(outputDirectory, CC.xywh(3, 9, 2, 1));
    add(outputDirectoryText, CC.xy(7, 9));

    //---- label2 ----
    label2.setText("Keywords(per comma):");
    add(label2, CC.xywh(3, 13, 3, 1));

    //======== scrollPane1 ========
    {
        scrollPane1.setViewportView(keywordsArea);
    }
    add(scrollPane1, CC.xywh(3, 14, 5, 4));

    //---- startButton ----
    startButton.setText("Start");
    startButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            startButtonClick(e);
        }
    });
    add(startButton, CC.xywh(3, 21, 5, 1));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:MainForm.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - ??????????? ????????
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    setFileTitle = new JLabel();
    textField1 = new JTextField();
    setFileButton = new JButton();
    label4 = new JLabel();
    radioButton1 = new JRadioButton();
    radioButton2 = new JRadioButton();
    label1 = new JLabel();
    label2 = new JLabel();
    scrollPane1 = new JScrollPane();
    openTextArea = new JTextArea();
    scrollPane2 = new JScrollPane();
    encryptTextArea = new JTextArea();
    buttonBar = new JPanel();
    label3 = new JLabel();
    progressBar1 = new JProgressBar();
    okButton = new JButton();
    cancelButton = new JButton();

    //======== this ========
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {/*from w w  w.  ja  v a  2s .  co  m*/
        dialogPane.setBorder(Borders.createEmptyBorder("7dlu, 7dlu, 7dlu, 7dlu"));

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

        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout(
                    "104dlu, $lcgap, 119dlu, $lcgap, 45dlu, $lcgap, default, $lcgap, 199dlu, $lcgap, default",
                    "5*(default, $lgap), 13dlu, 3*($lgap, default), $lgap, 62dlu"));

            //---- setFileTitle ----
            setFileTitle.setText("Choose the encrypt file");
            contentPanel.add(setFileTitle, CC.xy(1, 1));
            contentPanel.add(textField1, CC.xywh(1, 3, 3, 1));

            //---- setFileButton ----
            setFileButton.setText("Choose");
            contentPanel.add(setFileButton, CC.xy(5, 3));

            //---- label4 ----
            label4.setText("Mode");
            contentPanel.add(label4, CC.xy(1, 5));

            //---- radioButton1 ----
            radioButton1.setText("Encrypting");
            contentPanel.add(radioButton1, CC.xy(1, 7));

            //---- radioButton2 ----
            radioButton2.setText("Decryption");
            contentPanel.add(radioButton2, CC.xy(1, 9));

            //---- label1 ----
            label1.setText("Open Text");
            contentPanel.add(label1, CC.xy(1, 11));

            //---- label2 ----
            label2.setText("Encrypt Text");
            contentPanel.add(label2, CC.xywh(9, 11, 3, 1));

            //======== scrollPane1 ========
            {

                //---- openTextArea ----
                openTextArea.setRows(5);
                openTextArea.setLineWrap(true);
                scrollPane1.setViewportView(openTextArea);
            }
            contentPanel.add(scrollPane1, CC.xywh(1, 13, 3, 7));

            //======== scrollPane2 ========
            {
                scrollPane2.setViewportView(encryptTextArea);
            }
            contentPanel.add(scrollPane2, CC.xywh(7, 13, 3, 7));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.createEmptyBorder("5dlu, 0dlu, 0dlu, 0dlu"));
            buttonBar.setLayout(
                    new FormLayout("$lcgap, default, $glue, $button, $rgap, $button", "2*(default), pref"));

            //---- label3 ----
            label3.setText("Progress");
            buttonBar.add(label3, CC.xy(2, 2));
            buttonBar.add(progressBar1, CC.xy(2, 3));

            //---- okButton ----
            okButton.setText("OK");
            buttonBar.add(okButton, CC.xy(4, 3));

            //---- cancelButton ----
            cancelButton.setText("Exit");
            buttonBar.add(cancelButton, CC.xy(6, 3));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:ChatMenu.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Jurko Guba
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    label1 = new JLabel();
    label2 = new JLabel();
    scrollPane1 = new JScrollPane();
    textArea1 = new JTextArea();
    scrollPane2 = new JScrollPane();
    textArea2 = new JTextArea();
    textField1 = new JTextField();
    okButton = new JButton();

    //======== this ========
    setResizable(false);/*from  w w  w . j a  va  2 s .  co m*/
    setVisible(true);
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(Borders.createEmptyBorder("7dlu, 7dlu, 7dlu, 7dlu"));

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

        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(
                    new FormLayout("292dlu, $lcgap, 57dlu, 0dlu", "default, $lgap, 221dlu, $lgap, 18dlu"));

            //---- label1 ----
            label1.setText("Chat room");
            contentPanel.add(label1, CC.xy(1, 1));

            //---- label2 ----
            label2.setText("Online: 0");
            contentPanel.add(label2, CC.xy(3, 1));

            //======== scrollPane1 ========
            {

                //---- textArea1 ----
                textArea1.setEditable(false);
                scrollPane1.setViewportView(textArea1);
            }
            contentPanel.add(scrollPane1, CC.xywh(1, 3, 1, 2));

            //======== scrollPane2 ========
            {

                //---- textArea2 ----
                textArea2.setEditable(false);
                scrollPane2.setViewportView(textArea2);
            }
            contentPanel.add(scrollPane2, CC.xywh(3, 3, 2, 2));
            contentPanel.add(textField1, CC.xy(1, 5));

            //---- okButton ----
            okButton.setText("Send");
            okButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    sendButtonPressed(e);
                    okButtonActionPerformed(e);
                    sendButtonPressed(e);
                }
            });
            contentPanel.add(okButton, CC.xywh(3, 5, 2, 1));
        }
        dialogPane.add(contentPanel, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:MainView.java

private void onLoad() {
    initConsolePanel();//from   w  w w . ja v a 2 s. com
    accountMgr = new AccountManager(this);
    populateScheduleMenu();

    addAccountButton.setText("Add Account");
    addAccountButton.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
    leftPanel.add(addAccountButton, CC.xy(1, 1));
    addAccountButton.setVisible(false);
    addAccountButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent actionEvent) {
            accountMgr.showAddAccountView();
        }
    });

    addAccountButton.addPropertyChangeListener("visible", new PropertyChangeListener() {
        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            addAccountButtonPropertyChange(evt);
        }
    });

    searchPreferencesView = new SearchPreferencesView();
    runManager = new RunManager(accountMgr);
    int accountCount = accountMgr.fetchAccountCount();
    if (accountCount == 0) {
        manageAccountsMenuItem.setEnabled(false);
    }
    this.utils = new Utilities();
    initAutoWatchThread();
}

From source file:MainView.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    panel1 = new JPanel();
    menuBar = new JMenuBar();
    fileMenu = new JMenu();
    quitMenuItem = new JMenuItem();
    accountsMenu = new JMenu();
    manageAccountsMenuItem = new JMenuItem();
    addAccountMenuItem = new JMenuItem();
    scheduleMenu = new JMenu();
    manageSchedulesMenuItem = new JMenuItem();
    seperatorPanel = new JPanel();
    separator1 = new JSeparator();
    scheduleMenuItemsPanel = new JPanel();
    toolsmenu = new JMenu();
    clearAccountsMenuItem = new JMenuItem();
    resetIndexMenuItem = new JMenuItem();
    visitProfileMenuItem = new JMenuItem();
    checkProfileMenuItem = new JMenuItem();
    editAutoWatchListMenuItem = new JMenuItem();
    deleteInboxMenuItem = new JMenuItem();
    openConsoleMenuItem = new JMenuItem();
    visitVisitorsMenuItem = new JMenuItem();
    hideVisitorsMenuItem = new JMenuItem();
    mainPanel = new JPanel();
    leftPanel = new JPanel();
    usernamesCombo = new JComboBox();
    buttonPanel = new JPanel();
    loginButton = new JButton();
    runButton = new JButton();
    stopButton = new JButton();
    activityPanel = new JPanel();
    runPanel = new JPanel();
    label8 = new JLabel();
    resetRunButton = new JButton();
    label9 = new JLabel();
    runVisitsPanel = new JPanel();
    visitsCompletedUI = new JLabel();
    visitLimitUI = new JLabel();
    label2 = new JLabel();
    startTimeUI = new JLabel();
    label10 = new JLabel();
    elapsedUI = new JLabel();
    label4 = new JLabel();
    endTimeUI = new JLabel();
    totalPanel = new JPanel();
    label11 = new JLabel();
    totalVisitsUI = new JLabel();
    resetTotalButton = new JButton();
    activeSchedulePanel = new JPanel();
    schedulePanel1 = new JPanel();
    scheduleName1Label = new JLabel();
    label21 = new JLabel();
    scheduleTime1Label = new JLabel();
    schedulePanel2 = new JPanel();
    scheduleName2Label = new JLabel();
    label24 = new JLabel();
    scheduleTime2Label = new JLabel();
    schedulePanel3 = new JPanel();
    scheduleName3Label = new JLabel();
    label27 = new JLabel();
    scheduleTime3Label = new JLabel();
    schedulePanel4 = new JPanel();
    scheduleName4Label = new JLabel();
    label30 = new JLabel();
    scheduleTime4Label = new JLabel();
    rightPanel = new JPanel();
    settingsHeadingPanel = new JPanel();
    label1 = new JLabel();
    editButton = new JButton();
    autoHideLabel = new JLabel();
    orientation = new JLabel();
    radius = new JLabel();
    age = new JLabel();
    lastOnline = new JLabel();
    orderBy = new JLabel();
    watchPanel = new JPanel();
    autoWatchButton = new JToggleButton();
    lastCheckedContainer = new JPanel();
    lastCheckedPanel = new JPanel();
    lastCheckedLabel = new JLabel();
    label5 = new JLabel();
    nextCheckLabel = new JLabel();
    watchListPanel = new JPanel();
    watch1 = new JLabel();
    watchStatus1 = new JLabel();
    watch2 = new JLabel();
    watchStatus2 = new JLabel();
    watch3 = new JLabel();
    watchStatus3 = new JLabel();
    watch4 = new JLabel();
    watchStatus4 = new JLabel();
    watch5 = new JLabel();
    watchStatus5 = new JLabel();
    statusLineContainer = new JPanel();
    statusLinePanel = new JPanel();
    consoleOutputLabel = new JLabel();
    nextVisitPanel = new JPanel();
    label16 = new JLabel();
    nextVisitLabel = new JLabel();
    panel2 = new JPanel();
    label3 = new JLabel();
    visitorCountLabel = new JLabel();

    //======== this ========
    setTitle("OkcApp v4.1");
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout("[168dlu,default]:grow", "fill:207dlu:grow"));

    //======== panel1 ========
    {/*from w  ww.  j av a2  s. com*/
        panel1.setPreferredSize(new Dimension(300, 328));
        panel1.setName("panel1");
        panel1.setMinimumSize(new Dimension(280, 284));
        panel1.setMaximumSize(new Dimension(300, 330));
        panel1.setBorder(new MatteBorder(1, 1, 1, 1, Color.black));
        panel1.setLayout(new FormLayout("146dlu:grow", "fill:12dlu, fill:162dlu, fill:26dlu"));

        //======== menuBar ========
        {
            menuBar.setName("menuBar");
            menuBar.setPreferredSize(new Dimension(155, 10));

            //======== fileMenu ========
            {
                fileMenu.setText("File");
                fileMenu.setFont(new Font("Lucida Grande", Font.PLAIN, 12));

                //---- quitMenuItem ----
                quitMenuItem.setText("Quit");
                quitMenuItem.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                quitMenuItem.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        quitMenuItemActionPerformed(e);
                    }
                });
                fileMenu.add(quitMenuItem);
            }
            menuBar.add(fileMenu);

            //======== accountsMenu ========
            {
                accountsMenu.setText("Accounts");
                accountsMenu.setFont(new Font("Lucida Grande", Font.PLAIN, 12));

                //---- manageAccountsMenuItem ----
                manageAccountsMenuItem.setText("Manage Accounts");
                manageAccountsMenuItem.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                manageAccountsMenuItem.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        manageAccountsMenuItemActionPerformed(e);
                    }
                });
                accountsMenu.add(manageAccountsMenuItem);

                //---- addAccountMenuItem ----
                addAccountMenuItem.setText("Add Account");
                addAccountMenuItem.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                addAccountMenuItem.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        addAccountMenuItemActionPerformed(e);
                    }
                });
                accountsMenu.add(addAccountMenuItem);
            }
            menuBar.add(accountsMenu);

            //======== scheduleMenu ========
            {
                scheduleMenu.setText("Schedule");
                scheduleMenu.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                scheduleMenu.setName("scheduleMenu");

                //---- manageSchedulesMenuItem ----
                manageSchedulesMenuItem.setText("Manage Schedules");
                manageSchedulesMenuItem.setName("manageSchedules");
                manageSchedulesMenuItem.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                manageSchedulesMenuItem.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        manageSchedulesMenuItemActionPerformed(e);
                    }
                });
                scheduleMenu.add(manageSchedulesMenuItem);

                //======== seperatorPanel ========
                {
                    seperatorPanel.setBackground(Color.white);
                    seperatorPanel.setName("seperatorPanel");
                    seperatorPanel.setLayout(new FormLayout("center:85dlu", "default"));

                    //---- separator1 ----
                    separator1.setForeground(Color.black);
                    separator1.setPreferredSize(new Dimension(150, 12));
                    separator1.setName("seperator1");
                    seperatorPanel.add(separator1,
                            new CellConstraints(1, 1, 1, 1, CC.DEFAULT, CC.TOP, new Insets(0, 5, 0, 5)));
                }
                scheduleMenu.add(seperatorPanel);

                //======== scheduleMenuItemsPanel ========
                {
                    scheduleMenuItemsPanel.setName("scheduleMenuItemsPanel");
                    scheduleMenuItemsPanel.setLayout(new FormLayout("default", "default"));
                }
                scheduleMenu.add(scheduleMenuItemsPanel);
            }
            menuBar.add(scheduleMenu);

            //======== toolsmenu ========
            {
                toolsmenu.setText("Tools");
                toolsmenu.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                toolsmenu.setName("toolsMenu");

                //---- clearAccountsMenuItem ----
                clearAccountsMenuItem.setText("Clear Accounts");
                clearAccountsMenuItem.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                clearAccountsMenuItem.setName("clearAccounts");
                clearAccountsMenuItem.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        clearAccountsMenuItemActionPerformed(e);
                    }
                });
                toolsmenu.add(clearAccountsMenuItem);

                //---- resetIndexMenuItem ----
                resetIndexMenuItem.setText("Reset Index");
                resetIndexMenuItem.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                resetIndexMenuItem.setName("resetIndex");
                resetIndexMenuItem.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        resetIndexActionPerformed(e);
                    }
                });
                toolsmenu.add(resetIndexMenuItem);

                //---- visitProfileMenuItem ----
                visitProfileMenuItem.setText("Visit Single Profile");
                visitProfileMenuItem.setFont(visitProfileMenuItem.getFont()
                        .deriveFont(visitProfileMenuItem.getFont().getSize() - 2f));
                visitProfileMenuItem.setName("visitProfileMenuItem");
                visitProfileMenuItem.setEnabled(false);
                visitProfileMenuItem.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        visitProfileMenuItemActionPerformed(e);
                    }
                });
                toolsmenu.add(visitProfileMenuItem);

                //---- checkProfileMenuItem ----
                checkProfileMenuItem.setText("Check Profile");
                checkProfileMenuItem.setName("checkProfileMenuItem");
                checkProfileMenuItem.setEnabled(false);
                checkProfileMenuItem.setFont(checkProfileMenuItem.getFont()
                        .deriveFont(checkProfileMenuItem.getFont().getSize() - 2f));
                checkProfileMenuItem.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        checkProfileMenuItemActionPerformed(e);
                    }
                });
                toolsmenu.add(checkProfileMenuItem);

                //---- editAutoWatchListMenuItem ----
                editAutoWatchListMenuItem.setText("Edit Auto-Watch List");
                editAutoWatchListMenuItem.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                editAutoWatchListMenuItem.setName("editAutoWatchList");
                editAutoWatchListMenuItem.setEnabled(false);
                editAutoWatchListMenuItem.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        editAutoWatchListMenuItemActionPerformed(e);
                    }
                });
                toolsmenu.add(editAutoWatchListMenuItem);

                //---- deleteInboxMenuItem ----
                deleteInboxMenuItem.setText("Delete Inbox");
                deleteInboxMenuItem.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                deleteInboxMenuItem.setEnabled(false);
                deleteInboxMenuItem.setName("deleteInbox");
                deleteInboxMenuItem.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        deleteInboxMenuItemActionPerformed(e);
                    }
                });
                toolsmenu.add(deleteInboxMenuItem);

                //---- openConsoleMenuItem ----
                openConsoleMenuItem.setText("Console");
                openConsoleMenuItem.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                openConsoleMenuItem.setName("openConsole");
                openConsoleMenuItem.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        openConsoleMenuItemActionPerformed(e);
                    }
                });
                toolsmenu.add(openConsoleMenuItem);

                //---- visitVisitorsMenuItem ----
                visitVisitorsMenuItem.setText("Visit Visitors");
                visitVisitorsMenuItem.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                visitVisitorsMenuItem.setName("visitVisitors");
                visitVisitorsMenuItem.setEnabled(false);
                visitVisitorsMenuItem.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        visitVisitorsMenuItemActionPerformed(e);
                    }
                });
                toolsmenu.add(visitVisitorsMenuItem);

                //---- hideVisitorsMenuItem ----
                hideVisitorsMenuItem.setText("Hide Visitors");
                hideVisitorsMenuItem.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                hideVisitorsMenuItem.setName("hideVisitors");
                hideVisitorsMenuItem.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        hideNewVisitorsMenuItemActionPerformed(e);
                    }
                });
                toolsmenu.add(hideVisitorsMenuItem);
            }
            menuBar.add(toolsmenu);
        }
        panel1.add(menuBar, CC.xy(1, 1));

        //======== mainPanel ========
        {
            mainPanel.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
            mainPanel.setPreferredSize(new Dimension(305, 355));
            mainPanel.setName("mainPanel");
            mainPanel.setMinimumSize(new Dimension(250, 276));
            mainPanel.setLayout(new FormLayout("81dlu, $ugap, 123px", "166dlu:grow"));

            //======== leftPanel ========
            {
                leftPanel.setPreferredSize(new Dimension(175, 325));
                leftPanel.setBorder(null);
                leftPanel.setMinimumSize(new Dimension(150, 276));
                leftPanel.setLayout(
                        new FormLayout("min", "bottom:default, default, 2dlu, 76dlu, $lgap, default"));

                //---- usernamesCombo ----
                usernamesCombo.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                usernamesCombo.setPreferredSize(new Dimension(120, 27));
                usernamesCombo.setName("usernames");
                usernamesCombo.setVisible(false);
                usernamesCombo.addPropertyChangeListener("visible", new PropertyChangeListener() {
                    @Override
                    public void propertyChange(PropertyChangeEvent e) {
                        usernamesComboPropertyChange(e);
                    }
                });
                usernamesCombo.addPopupMenuListener(new PopupMenuListener() {
                    @Override
                    public void popupMenuCanceled(PopupMenuEvent e) {
                    }

                    @Override
                    public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
                        usernamesComboPopupMenuWillBecomeInvisible(e);
                    }

                    @Override
                    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
                    }
                });
                leftPanel.add(usernamesCombo, CC.xy(1, 1));

                //======== buttonPanel ========
                {
                    buttonPanel.setName("buttonPanel");
                    buttonPanel.setLayout(new FormLayout("30dlu, 28dlu, 24dlu", "default"));

                    //---- loginButton ----
                    loginButton.setText("Login");
                    loginButton.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                    loginButton.setPreferredSize(new Dimension(70, 25));
                    loginButton.setName("login");
                    loginButton.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                            loginButtonActionPerformed(e);
                        }
                    });
                    buttonPanel.add(loginButton, CC.xy(1, 1, CC.LEFT, CC.DEFAULT));

                    //---- runButton ----
                    runButton.setText("Run");
                    runButton.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                    runButton.setPreferredSize(new Dimension(70, 25));
                    runButton.setName("run");
                    runButton.setEnabled(false);
                    runButton.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                            runButtonActionPerformed(e);
                        }
                    });
                    runButton.addPropertyChangeListener("visible", new PropertyChangeListener() {
                        @Override
                        public void propertyChange(PropertyChangeEvent e) {
                            runButtonPropertyChange(e);
                        }
                    });
                    buttonPanel.add(runButton, CC.xy(2, 1, CC.LEFT, CC.DEFAULT));

                    //---- stopButton ----
                    stopButton.setText("Stop");
                    stopButton.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                    stopButton.setName("stopButton");
                    stopButton.setForeground(Color.red);
                    stopButton.setVisible(false);
                    stopButton.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                            stopButtonActionPerformed(e);
                        }
                    });
                    buttonPanel.add(stopButton, CC.xy(3, 1));
                }
                leftPanel.add(buttonPanel, CC.xy(1, 2, CC.DEFAULT, CC.FILL));

                //======== activityPanel ========
                {
                    activityPanel.setName("activityPanel");
                    activityPanel.setPreferredSize(new Dimension(117, 300));
                    activityPanel.setBorder(new MatteBorder(0, 0, 0, 0, Color.black));
                    activityPanel.setLayout(new FormLayout("76dlu", "top:60dlu, top:16dlu"));

                    //======== runPanel ========
                    {
                        runPanel.setName("runPanel");
                        runPanel.setPreferredSize(new Dimension(200, 130));
                        runPanel.setBorder(new MatteBorder(1, 0, 1, 0, Color.black));
                        runPanel.setLayout(new FormLayout("34dlu, 25dlu:grow",
                                "3dlu, 10dlu, $lgap, min, 3*($lgap, default)"));

                        //---- label8 ----
                        label8.setText("Current");
                        label8.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        runPanel.add(label8, new CellConstraints(1, 2, 1, 1, CC.DEFAULT, CC.DEFAULT,
                                new Insets(0, 2, 0, 0)));

                        //---- resetRunButton ----
                        resetRunButton.setText("Reset");
                        resetRunButton.setPreferredSize(new Dimension(50, 15));
                        resetRunButton.setFont(new Font("Lucida Grande", Font.PLAIN, 9));
                        resetRunButton.setName("resetRun");
                        resetRunButton.addActionListener(new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent e) {
                                resetRunButtonActionPerformed(e);
                            }
                        });
                        runPanel.add(resetRunButton, CC.xy(2, 2, CC.LEFT, CC.TOP));

                        //---- label9 ----
                        label9.setText("- Visits");
                        label9.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        runPanel.add(label9, new CellConstraints(1, 4, 1, 1, CC.DEFAULT, CC.DEFAULT,
                                new Insets(0, 10, 0, 0)));

                        //======== runVisitsPanel ========
                        {
                            runVisitsPanel.setName("runVisitsPanel");
                            runVisitsPanel.setLayout(new FormLayout("default, $lcgap, 25dlu", "default"));

                            //---- visitsCompletedUI ----
                            visitsCompletedUI.setText("0");
                            visitsCompletedUI.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                            visitsCompletedUI.setName("visitsCompleted");
                            visitsCompletedUI.addPropertyChangeListener(new PropertyChangeListener() {
                                @Override
                                public void propertyChange(PropertyChangeEvent e) {
                                    visitsCompletedUIPropertyChange(e);
                                }
                            });
                            runVisitsPanel.add(visitsCompletedUI, CC.xy(1, 1));

                            //---- visitLimitUI ----
                            visitLimitUI.setText("of 0");
                            visitLimitUI.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                            visitLimitUI.setName("visitLimitUI");
                            runVisitsPanel.add(visitLimitUI, CC.xy(3, 1));
                        }
                        runPanel.add(runVisitsPanel, CC.xy(2, 4));

                        //---- label2 ----
                        label2.setText("- Start");
                        label2.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        runPanel.add(label2, new CellConstraints(1, 6, 1, 1, CC.DEFAULT, CC.DEFAULT,
                                new Insets(0, 10, 0, 0)));

                        //---- startTimeUI ----
                        startTimeUI.setText("00:00");
                        startTimeUI.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        startTimeUI.setName("start_time");
                        runPanel.add(startTimeUI, CC.xy(2, 6));

                        //---- label10 ----
                        label10.setText("- Elapsed");
                        label10.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        runPanel.add(label10, new CellConstraints(1, 8, 1, 1, CC.DEFAULT, CC.DEFAULT,
                                new Insets(0, 10, 0, 0)));

                        //---- elapsedUI ----
                        elapsedUI.setText("00:00:00");
                        elapsedUI.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        elapsedUI.setName("elapsed");
                        runPanel.add(elapsedUI, CC.xy(2, 8));

                        //---- label4 ----
                        label4.setText("- End");
                        label4.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        runPanel.add(label4, new CellConstraints(1, 10, 1, 1, CC.DEFAULT, CC.DEFAULT,
                                new Insets(0, 10, 0, 0)));

                        //---- endTimeUI ----
                        endTimeUI.setText("00:00 PM");
                        endTimeUI.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        endTimeUI.setName("end_time");
                        runPanel.add(endTimeUI, CC.xy(2, 10));
                    }
                    activityPanel.add(runPanel, CC.xy(1, 1, CC.DEFAULT, CC.CENTER));

                    //======== totalPanel ========
                    {
                        totalPanel.setName("totalPanel");
                        totalPanel.setPreferredSize(new Dimension(200, 60));
                        totalPanel.setBorder(new MatteBorder(0, 0, 1, 0, Color.black));
                        totalPanel.setLayout(new FormLayout("33dlu, min, 3dlu, 21dlu", "10dlu"));

                        //---- label11 ----
                        label11.setText("Total Visits:");
                        label11.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        totalPanel.add(label11, new CellConstraints(1, 1, 1, 1, CC.DEFAULT, CC.DEFAULT,
                                new Insets(0, 2, 0, 0)));

                        //---- totalVisitsUI ----
                        totalVisitsUI.setText("0");
                        totalVisitsUI.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        totalVisitsUI.setName("totalVisits");
                        totalPanel.add(totalVisitsUI, CC.xy(2, 1, CC.FILL, CC.DEFAULT));

                        //---- resetTotalButton ----
                        resetTotalButton.setText("Reset");
                        resetTotalButton.setFont(new Font("Lucida Grande", Font.PLAIN, 9));
                        resetTotalButton.setPreferredSize(new Dimension(50, 15));
                        resetTotalButton.setName("resetTotal");
                        resetTotalButton.addActionListener(new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent e) {
                                resetTotalButtonActionPerformed(e);
                            }
                        });
                        totalPanel.add(resetTotalButton, CC.xy(4, 1, CC.LEFT, CC.DEFAULT));
                    }
                    activityPanel.add(totalPanel,
                            new CellConstraints(1, 2, 1, 1, CC.DEFAULT, CC.DEFAULT, new Insets(5, 0, 0, 0)));
                }
                leftPanel.add(activityPanel,
                        new CellConstraints(1, 4, 1, 1, CC.DEFAULT, CC.DEFAULT, new Insets(0, 10, 0, 0)));

                //======== activeSchedulePanel ========
                {
                    activeSchedulePanel.setName("activeSchedulePanel2");
                    activeSchedulePanel
                            .setLayout(new FormLayout("default:grow", "3*(default, $lgap), default"));

                    //======== schedulePanel1 ========
                    {
                        schedulePanel1.setName("schedulePanel1");
                        schedulePanel1.setVisible(false);
                        schedulePanel1.setLayout(new FormLayout("2*(default, $lcgap), default", "default"));

                        //---- scheduleName1Label ----
                        scheduleName1Label.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        scheduleName1Label.setName("scheduleName1Label");
                        schedulePanel1.add(scheduleName1Label, CC.xy(1, 1));

                        //---- label21 ----
                        label21.setText("-");
                        label21.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        schedulePanel1.add(label21, CC.xy(3, 1, CC.CENTER, CC.DEFAULT));

                        //---- scheduleTime1Label ----
                        scheduleTime1Label.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        scheduleTime1Label.setName("scheduleTime1Label");
                        schedulePanel1.add(scheduleTime1Label, CC.xy(5, 1));
                    }
                    activeSchedulePanel.add(schedulePanel1, CC.xy(1, 1));

                    //======== schedulePanel2 ========
                    {
                        schedulePanel2.setName("schedulePanel2");
                        schedulePanel2.setVisible(false);
                        schedulePanel2.setLayout(new FormLayout("2*(default, $lcgap), default", "default"));

                        //---- scheduleName2Label ----
                        scheduleName2Label.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        scheduleName2Label.setName("scheduleName2Label");
                        schedulePanel2.add(scheduleName2Label, CC.xy(1, 1));

                        //---- label24 ----
                        label24.setText("-");
                        label24.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        schedulePanel2.add(label24, CC.xy(3, 1, CC.CENTER, CC.DEFAULT));

                        //---- scheduleTime2Label ----
                        scheduleTime2Label.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        scheduleTime2Label.setName("scheduleTime2Label");
                        schedulePanel2.add(scheduleTime2Label, CC.xy(5, 1));
                    }
                    activeSchedulePanel.add(schedulePanel2, CC.xy(1, 3));

                    //======== schedulePanel3 ========
                    {
                        schedulePanel3.setName("schedulePanel3");
                        schedulePanel3.setVisible(false);
                        schedulePanel3.setLayout(new FormLayout("2*(default, $lcgap), default", "default"));

                        //---- scheduleName3Label ----
                        scheduleName3Label.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        scheduleName3Label.setName("scheduleName3Label");
                        schedulePanel3.add(scheduleName3Label, CC.xy(1, 1));

                        //---- label27 ----
                        label27.setText("-");
                        label27.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        schedulePanel3.add(label27, CC.xy(3, 1, CC.CENTER, CC.DEFAULT));

                        //---- scheduleTime3Label ----
                        scheduleTime3Label.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        scheduleTime3Label.setName("scheduleTime3Label");
                        schedulePanel3.add(scheduleTime3Label, CC.xy(5, 1));
                    }
                    activeSchedulePanel.add(schedulePanel3, CC.xy(1, 5));

                    //======== schedulePanel4 ========
                    {
                        schedulePanel4.setName("schedulePanel4");
                        schedulePanel4.setVisible(false);
                        schedulePanel4.setLayout(new FormLayout("2*(default, $lcgap), default", "default"));

                        //---- scheduleName4Label ----
                        scheduleName4Label.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        scheduleName4Label.setName("scheduleName4Label");
                        schedulePanel4.add(scheduleName4Label, CC.xy(1, 1));

                        //---- label30 ----
                        label30.setText("-");
                        label30.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        schedulePanel4.add(label30, CC.xy(3, 1, CC.CENTER, CC.DEFAULT));

                        //---- scheduleTime4Label ----
                        scheduleTime4Label.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        scheduleTime4Label.setName("scheduleTime4Label");
                        schedulePanel4.add(scheduleTime4Label, CC.xy(5, 1));
                    }
                    activeSchedulePanel.add(schedulePanel4, CC.xy(1, 7));
                }
                leftPanel.add(activeSchedulePanel,
                        new CellConstraints(1, 6, 1, 1, CC.DEFAULT, CC.DEFAULT, new Insets(0, 10, 0, 0)));
            }
            mainPanel.add(leftPanel, CC.xy(1, 1, CC.FILL, CC.TOP));

            //======== rightPanel ========
            {
                rightPanel.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                rightPanel.setPreferredSize(new Dimension(180, 250));
                rightPanel.setMinimumSize(new Dimension(121, 276));
                rightPanel.setLayout(new FormLayout("73dlu", "7*(default, $lgap), default"));

                //======== settingsHeadingPanel ========
                {
                    settingsHeadingPanel.setName("settingsheadingPanel");
                    settingsHeadingPanel.setLayout(new FormLayout("default, $lcgap, 28dlu", "22dlu"));

                    //---- label1 ----
                    label1.setText("Settings");
                    label1.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
                    settingsHeadingPanel.add(label1, CC.xy(1, 1));

                    //---- editButton ----
                    editButton.setText("Edit");
                    editButton.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                    editButton.setEnabled(false);
                    editButton.setPreferredSize(new Dimension(70, 25));
                    editButton.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                            editButtonActionPerformed(e);
                        }
                    });
                    settingsHeadingPanel.add(editButton, CC.xy(3, 1));
                }
                rightPanel.add(settingsHeadingPanel, CC.xy(1, 1));

                //---- autoHideLabel ----
                autoHideLabel.setText("- Auto-hide:");
                autoHideLabel.setFont(new Font("Lucida Grande", Font.ITALIC, 10));
                autoHideLabel.setName("autoHideLabel");
                rightPanel.add(autoHideLabel, CC.xy(1, 3));

                //---- orientation ----
                orientation.setText("- orientation");
                orientation.setFont(new Font("Lucida Grande", Font.ITALIC, 10));
                orientation.setName("orientationSet");
                rightPanel.add(orientation, CC.xy(1, 5));

                //---- radius ----
                radius.setText("- search radius");
                radius.setFont(new Font("Lucida Grande", Font.ITALIC, 10));
                radius.setName("radiusSet");
                rightPanel.add(radius, CC.xy(1, 7));

                //---- age ----
                age.setText("- age");
                age.setFont(new Font("Lucida Grande", Font.ITALIC, 10));
                age.setName("ageSet");
                rightPanel.add(age, CC.xy(1, 9));

                //---- lastOnline ----
                lastOnline.setText("- last online");
                lastOnline.setFont(new Font("Lucida Grande", Font.ITALIC, 10));
                lastOnline.setName("lastOnlineSet");
                rightPanel.add(lastOnline, CC.xy(1, 11));

                //---- orderBy ----
                orderBy.setText("- sort order");
                orderBy.setFont(new Font("Lucida Grande", Font.ITALIC, 10));
                orderBy.setName("orderBySet");
                rightPanel.add(orderBy, CC.xy(1, 13));

                //======== watchPanel ========
                {
                    watchPanel.setName("watchPanel");
                    watchPanel.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                    watchPanel.setLayout(new FormLayout("72dlu:grow", "15dlu, $lgap, 10dlu, 82dlu"));

                    //---- autoWatchButton ----
                    autoWatchButton.setText("Auto-Watch");
                    autoWatchButton.setPreferredSize(new Dimension(85, 29));
                    autoWatchButton.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                    autoWatchButton.setName("autoWatch");
                    autoWatchButton.setEnabled(false);
                    autoWatchButton.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                            autoWatchButtonActionPerformed(e);
                        }
                    });
                    watchPanel.add(autoWatchButton,
                            new CellConstraints(1, 1, 1, 1, CC.LEFT, CC.DEFAULT, new Insets(0, -5, 0, 0)));

                    //======== lastCheckedContainer ========
                    {
                        lastCheckedContainer.setName("lastCheckedContainer");
                        lastCheckedContainer.setLayout(new FormLayout("71dlu", "default"));

                        //======== lastCheckedPanel ========
                        {
                            lastCheckedPanel.setName("lastCheckedPanel");
                            lastCheckedPanel
                                    .setLayout(new FormLayout("left:25dlu, center:10dlu, left:18dlu", "10dlu"));

                            //---- lastCheckedLabel ----
                            lastCheckedLabel.setName("lastChecked");
                            lastCheckedLabel.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                            lastCheckedLabel.setText("00:00 AM");
                            lastCheckedLabel.setBorder(null);
                            lastCheckedPanel.add(lastCheckedLabel, CC.xy(1, 1, CC.RIGHT, CC.DEFAULT));

                            //---- label5 ----
                            label5.setText(" / ");
                            label5.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                            lastCheckedPanel.add(label5, CC.xy(2, 1));

                            //---- nextCheckLabel ----
                            nextCheckLabel.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                            nextCheckLabel.setName("nextCheckLabel");
                            nextCheckLabel.setBorder(null);
                            lastCheckedPanel.add(nextCheckLabel, CC.xy(3, 1));
                        }
                        lastCheckedContainer.add(lastCheckedPanel,
                                new CellConstraints(1, 1, 1, 1, CC.LEFT, CC.DEFAULT, new Insets(0, 2, 0, 0)));
                    }
                    watchPanel.add(lastCheckedContainer, CC.xy(1, 3));

                    //======== watchListPanel ========
                    {
                        watchListPanel.setLayout(
                                new FormLayout("50dlu, 3dlu, 29dlu:grow", "4*(default, $lgap), default"));

                        //---- watch1 ----
                        watch1.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        watch1.setName("watch1");
                        watch1.setVisible(false);
                        watchListPanel.add(watch1, CC.xy(1, 1));

                        //---- watchStatus1 ----
                        watchStatus1.setText("-");
                        watchStatus1.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        watchStatus1.setName("watchStatus1");
                        watchStatus1.setVisible(false);
                        watchListPanel.add(watchStatus1, CC.xy(3, 1, CC.LEFT, CC.DEFAULT));

                        //---- watch2 ----
                        watch2.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        watch2.setName("watch2");
                        watch2.setVisible(false);
                        watchListPanel.add(watch2, CC.xy(1, 3));

                        //---- watchStatus2 ----
                        watchStatus2.setText("-");
                        watchStatus2.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        watchStatus2.setName("watchStatus2");
                        watchStatus2.setVisible(false);
                        watchListPanel.add(watchStatus2, CC.xy(3, 3, CC.LEFT, CC.DEFAULT));

                        //---- watch3 ----
                        watch3.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        watch3.setName("watch3");
                        watch3.setVisible(false);
                        watchListPanel.add(watch3, CC.xy(1, 5));

                        //---- watchStatus3 ----
                        watchStatus3.setText("-");
                        watchStatus3.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        watchStatus3.setName("watchStatus3");
                        watchStatus3.setVisible(false);
                        watchListPanel.add(watchStatus3, CC.xy(3, 5, CC.LEFT, CC.DEFAULT));

                        //---- watch4 ----
                        watch4.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        watch4.setName("watch4");
                        watch4.setVisible(false);
                        watchListPanel.add(watch4, CC.xy(1, 7));

                        //---- watchStatus4 ----
                        watchStatus4.setText("-");
                        watchStatus4.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        watchStatus4.setName("watchStatus4");
                        watchStatus4.setVisible(false);
                        watchListPanel.add(watchStatus4, CC.xy(3, 7, CC.LEFT, CC.DEFAULT));

                        //---- watch5 ----
                        watch5.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        watch5.setName("watch5");
                        watch5.setVisible(false);
                        watchListPanel.add(watch5, CC.xy(1, 9));

                        //---- watchStatus5 ----
                        watchStatus5.setText("-");
                        watchStatus5.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
                        watchStatus5.setName("watchStatus5");
                        watchStatus5.setVisible(false);
                        watchListPanel.add(watchStatus5, CC.xy(3, 9, CC.LEFT, CC.DEFAULT));
                    }
                    watchPanel.add(watchListPanel,
                            new CellConstraints(1, 4, 1, 1, CC.DEFAULT, CC.TOP, new Insets(5, 4, 0, 0)));
                }
                rightPanel.add(watchPanel, CC.xy(1, 15));
            }
            mainPanel.add(rightPanel, CC.xy(3, 1, CC.DEFAULT, CC.TOP));
        }
        panel1.add(mainPanel, new CellConstraints(1, 2, 1, 1, CC.DEFAULT, CC.DEFAULT, new Insets(5, 5, 0, 0)));

        //======== statusLineContainer ========
        {
            statusLineContainer.setName("statusLineContainer");
            statusLineContainer.setBorder(new MatteBorder(1, 0, 0, 0, Color.black));
            statusLineContainer.setBackground(new Color(204, 204, 204));
            statusLineContainer.setPreferredSize(new Dimension(277, 60));
            statusLineContainer.setLayout(new FormLayout("144dlu:grow", "top:33dlu"));

            //======== statusLinePanel ========
            {
                statusLinePanel.setName("statusLinePanel");
                statusLinePanel.setBackground(new Color(204, 204, 204));
                statusLinePanel.setLayout(
                        new FormLayout("75dlu:grow, right:20dlu:grow", "bottom:default:grow, $nlgap, default"));

                //---- consoleOutputLabel ----
                consoleOutputLabel.setText("Please log in.");
                consoleOutputLabel.setName("consoleOutput");
                consoleOutputLabel.setFont(new Font("Lucida Grande", Font.ITALIC, 12));
                statusLinePanel.add(consoleOutputLabel,
                        new CellConstraints(1, 1, 1, 1, CC.DEFAULT, CC.DEFAULT, new Insets(0, 5, 0, 0)));

                //======== nextVisitPanel ========
                {
                    nextVisitPanel.setName("nextVisitPanel");
                    nextVisitPanel.setBackground(new Color(204, 204, 204));
                    nextVisitPanel.setLayout(
                            new FormLayout("left:30dlu:grow, $rgap, left:14dlu", "bottom:default:grow"));

                    //---- label16 ----
                    label16.setText("Next visit:");
                    label16.setName("nextVisit");
                    label16.setFont(new Font("Lucida Grande", Font.ITALIC, 12));
                    nextVisitPanel.add(label16, CC.xy(1, 1, CC.LEFT, CC.DEFAULT));

                    //---- nextVisitLabel ----
                    nextVisitLabel.setText("-");
                    nextVisitLabel.setName("nextVisit");
                    nextVisitPanel.add(nextVisitLabel, CC.xy(3, 1, CC.LEFT, CC.DEFAULT));
                }
                statusLinePanel.add(nextVisitPanel, CC.xy(2, 1, CC.RIGHT, CC.DEFAULT));

                //======== panel2 ========
                {
                    panel2.setBackground(new Color(204, 204, 204));
                    panel2.setLayout(new FormLayout("28dlu, $lcgap, center:11dlu:grow", "default"));

                    //---- label3 ----
                    label3.setText("Visitors:");
                    label3.setFont(new Font("Lucida Grande", Font.ITALIC, 12));
                    panel2.add(label3, CC.xy(1, 1));

                    //---- visitorCountLabel ----
                    visitorCountLabel.setText("-");
                    visitorCountLabel.setName("visitorCount");
                    visitorCountLabel.setFont(new Font("Lucida Grande", Font.ITALIC, 12));
                    panel2.add(visitorCountLabel, CC.xy(3, 1, CC.LEFT, CC.DEFAULT));
                }
                statusLinePanel.add(panel2,
                        new CellConstraints(1, 3, 1, 1, CC.DEFAULT, CC.DEFAULT, new Insets(0, 5, 0, 0)));
            }
            statusLineContainer.add(statusLinePanel, CC.xy(1, 1));
        }
        panel1.add(statusLineContainer, CC.xy(1, 3));
    }
    contentPane.add(panel1, CC.xy(1, 1));
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:ClientConnectionGUI.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Austin Seber
    clientConnectionGUI = new JPanel();
    contentPanel = new JPanel();
    serverAddressTextField = new JTextField();
    serverNameTextField = new JTextField();
    serverPortTextField = new JTextField();
    saveServerInformationCheckButton = new JCheckBox();
    buttonBar = new JPanel();
    notificationTextField = new JTextField();
    connectButton = new JButton();
    cancelButton = new JButton();

    //======== this ========
    setTitle("Connect to a server");
    setResizable(false);/* w  ww . j a  v  a  2s .c om*/
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== clientConnectionGUI ========
    {
        clientConnectionGUI.setBorder(Borders.DIALOG_BORDER);

        clientConnectionGUI.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout("135dlu, $lcgap, 106dlu", "2*(default, $lgap), default"));

            //---- serverAddressTextField ----
            serverAddressTextField.setBorder(new TitledBorder(null, "Server address", TitledBorder.LEADING,
                    TitledBorder.DEFAULT_POSITION, null, Color.black));
            serverAddressTextField.setBackground(new Color(240, 240, 240));
            serverAddressTextField.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
            serverAddressTextField.setText("localhost");
            contentPanel.add(serverAddressTextField, CC.xywh(1, 1, 3, 1));
            serverAddressTextField.addKeyListener(new KeyListener() {

                @Override
                public void keyPressed(KeyEvent key) {

                    if (key.getKeyCode() == KeyEvent.VK_ENTER) {

                        connectButtonMouseClicked();

                    }

                    if (key.getKeyCode() == KeyEvent.VK_ESCAPE) {

                        cancelButtonMouseClicked();

                    }

                }

                @Override
                public void keyReleased(KeyEvent e) {
                }

                @Override
                public void keyTyped(KeyEvent e) {
                }

            });

            //---- serverNameTextField ----
            serverNameTextField.setBorder(new TitledBorder(null, "Server name", TitledBorder.LEADING,
                    TitledBorder.DEFAULT_POSITION, null, Color.black));
            serverNameTextField.setBackground(new Color(240, 240, 240));
            serverNameTextField.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
            contentPanel.add(serverNameTextField, CC.xy(1, 3));

            //---- serverPortTextField ----
            serverPortTextField.setBorder(new TitledBorder(null, "Server port", TitledBorder.LEADING,
                    TitledBorder.DEFAULT_POSITION, null, Color.black));
            serverPortTextField.setBackground(new Color(240, 240, 240));
            serverPortTextField.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
            serverPortTextField.setText("25566");
            contentPanel.add(serverPortTextField, CC.xy(3, 3));
            serverPortTextField.addKeyListener(new KeyListener() {

                @Override
                public void keyPressed(KeyEvent key) {

                    if (key.getKeyCode() == KeyEvent.VK_ENTER) {

                        connectButtonMouseClicked();

                    }

                    if (key.getKeyCode() == KeyEvent.VK_ESCAPE) {

                        cancelButtonMouseClicked();

                    }

                }

                @Override
                public void keyReleased(KeyEvent e) {
                }

                @Override
                public void keyTyped(KeyEvent e) {
                }

            });

            //---- saveServerInformationCheckButton ----
            saveServerInformationCheckButton.setText("Save server information");
            saveServerInformationCheckButton.setBorder(new LineBorder(new Color(0, 0, 0, 0), 2));
            contentPanel.add(saveServerInformationCheckButton, CC.xy(3, 5));
        }
        clientConnectionGUI.add(contentPanel, BorderLayout.WEST);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            buttonBar.setLayout(new FormLayout("$lcgap, 133dlu, $lcgap, $button, $rgap, $button", "pref"));

            //---- notificationTextField ----
            notificationTextField.setBorder(new LineBorder(new Color(0, 0, 0, 0), 2));
            notificationTextField.setBackground(new Color(240, 240, 240));
            notificationTextField.setEditable(false);
            buttonBar.add(notificationTextField, CC.xy(2, 1));

            //---- connectButton ----
            connectButton.setText("Connect");
            connectButton.addActionListener(new ActionListener() {

                @Override
                public void actionPerformed(ActionEvent arg0) {

                    connectButtonMouseClicked();

                }

            });
            buttonBar.add(connectButton, CC.xy(4, 1));

            //---- cancelButton ----
            cancelButton.setText("Cancel");
            cancelButton.addActionListener(new ActionListener() {

                @Override
                public void actionPerformed(ActionEvent arg0) {

                    cancelButtonMouseClicked();

                }

            });
            buttonBar.add(cancelButton, CC.xy(6, 1));
        }
        clientConnectionGUI.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(clientConnectionGUI, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents

    serverNameTextField.setEnabled(false);
    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    connectButton.setFocusable(false);
    //connectButton.setMnemonic(KeyEvent.VK_ENTER); //Make the enter key connect to the server as if you were pressing it.
    cancelButton.setFocusable(false);
    //cancelButton.setMnemonic(KeyEvent.VK_ESCAPE); //Make the escape key quit from the menu as if you were pressing it.

}