Example usage for javax.swing GroupLayout setHorizontalGroup

List of usage examples for javax.swing GroupLayout setHorizontalGroup

Introduction

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

Prototype

public void setHorizontalGroup(Group group) 

Source Link

Document

Sets the Group that positions and sizes components along the horizontal axis.

Usage

From source file:simx.profiler.info.application.MessagesInfoTopComponent.java

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

    jTabbedPane1 = new javax.swing.JTabbedPane();
    graphicalPanel = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    messageTypeInformationTable = new javax.swing.JTable();

    javax.swing.GroupLayout graphicalPanelLayout = new javax.swing.GroupLayout(graphicalPanel);
    graphicalPanel.setLayout(graphicalPanelLayout);
    graphicalPanelLayout.setHorizontalGroup(graphicalPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 543, Short.MAX_VALUE));
    graphicalPanelLayout.setVerticalGroup(graphicalPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 424, Short.MAX_VALUE));

    jTabbedPane1.addTab(org.openide.util.NbBundle.getMessage(MessagesInfoTopComponent.class,
            "MessagesInfoTopComponent.graphicalPanel.TabConstraints.tabTitle"), graphicalPanel); // NOI18N

    messageTypeInformationTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {

    }, new String[] { "Type", "Amount", "%" }) {
        Class[] types = new Class[] { java.lang.String.class, java.lang.Integer.class,
                java.lang.Integer.class };
        boolean[] canEdit = new boolean[] { false, true, true };

        public Class getColumnClass(int columnIndex) {
            return types[columnIndex];
        }

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
        }
    });
    messageTypeInformationTable.setMaximumSize(new java.awt.Dimension(2147483647, 32000));
    messageTypeInformationTable.setMinimumSize(new java.awt.Dimension(0, 0));
    jScrollPane1.setViewportView(messageTypeInformationTable);
    if (messageTypeInformationTable.getColumnModel().getColumnCount() > 0) {
        messageTypeInformationTable.getColumnModel().getColumn(0)
                .setHeaderValue(org.openide.util.NbBundle.getMessage(MessagesInfoTopComponent.class,
                        "MessagesInfoTopComponent.messageTypeInformationTable.columnModel.title0")); // NOI18N
        messageTypeInformationTable.getColumnModel().getColumn(1)
                .setHeaderValue(org.openide.util.NbBundle.getMessage(MessagesInfoTopComponent.class,
                        "MessagesInfoTopComponent.messageTypeInformationTable.columnModel.title1")); // NOI18N
        messageTypeInformationTable.getColumnModel().getColumn(2)
                .setHeaderValue(org.openide.util.NbBundle.getMessage(MessagesInfoTopComponent.class,
                        "MessagesInfoTopComponent.messageTypeInformationTable.columnModel.title2")); // NOI18N
    }

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout
            .setHorizontalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 543, Short.MAX_VALUE));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 443, Short.MAX_VALUE));

    jTabbedPane1.addTab(org.openide.util.NbBundle.getMessage(MessagesInfoTopComponent.class,
            "MessagesInfoTopComponent.jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N

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

From source file:Interface.CommunityAdminWorkArea.BestCitizen.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 v a 2s  . c  o  m
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jLabel1 = new javax.swing.JLabel();
    jDateChooser1 = new com.toedter.calendar.JDateChooser();
    jDateChooser2 = new com.toedter.calendar.JDateChooser();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    btnCalculate = new javax.swing.JButton();
    btnBack = new javax.swing.JButton();

    jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
    jLabel1.setText("Top 3 Citizen with Maximum Rewards Points");

    jDateChooser1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

    jDateChooser2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

    jLabel2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
    jLabel2.setText("From Date");

    jLabel3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
    jLabel3.setText("To Date");

    btnCalculate.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
    btnCalculate.setText("View Results >>");
    btnCalculate.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCalculateActionPerformed(evt);
        }
    });

    btnBack.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
    btnBack.setText("<< Back");
    btnBack.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBackActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addGap(279, 279, 279).addComponent(jLabel1))
                    .addGroup(layout.createSequentialGroup().addGap(58, 58, 58)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel2).addComponent(jLabel3))
                            .addGap(58, 58, 58)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(btnCalculate)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    190, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jDateChooser2,
                                                    javax.swing.GroupLayout.Alignment.TRAILING,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 190,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(btnBack)))
                    .addContainerGap(270, Short.MAX_VALUE)));
    layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addGap(26, 26, 26).addComponent(jLabel1)
                            .addGap(103, 103, 103)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(layout.createSequentialGroup().addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel2)
                                            .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGap(36, 36, 36).addComponent(jLabel3,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 29,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(jDateChooser2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(37, 37, 37).addComponent(btnCalculate)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 223,
                                    Short.MAX_VALUE)
                            .addComponent(btnBack).addContainerGap()));
}

From source file:com.cactus.ClientRegisterGUI.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.//  ww  w.j  av a2s .  co m
 */

// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    this.pack();
    this.setLocationRelativeTo(null);

    Username_TextField = new JTextField();
    Email_TextField = new JTextField();
    Email_Confirm_TextField = new JTextField();
    Password_TextField = new JPasswordField();
    Confirm_Password_TextField = new JPasswordField();
    Username_Label = new JLabel();
    Email_Label = new JLabel();
    Email_Confirm_Label = new JLabel();
    Password_Label = new JLabel();
    Confirm_Password_Label = new JLabel();
    Register_Button = new JButton();
    Cancel_Button = new JButton();

    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

    Email_TextField.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            Email_TextFieldActionPerformed(evt);
        }
    });

    Username_Label.setText("Username:");
    Email_Label.setText("Email:");
    Email_Confirm_Label.setText("Confirm Email:");
    Password_Label.setText("Password:");
    Confirm_Password_Label.setText("Confirm Password:");

    Register_Button.setText("Register");
    Register_Button.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            try {
                Register_ButtonActionPerformed(evt);
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
    });

    Cancel_Button.setText("Cancel");
    Cancel_Button.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            try {
                Cancel_ButtonActionPerformed(evt);
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
    });

    javax.swing.GroupLayout layout = new GroupLayout(getContentPane());
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addGap(67)
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addComponent(Confirm_Password_Label)
                            .addContainerGap())
                    .addGroup(layout.createParallelGroup(Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup().addComponent(Email_Confirm_Label)
                                    .addContainerGap())
                            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup().addComponent(Email_Label)
                                            .addContainerGap())
                                    .addGroup(layout.createSequentialGroup().addComponent(Password_Label)
                                            .addContainerGap())
                                    .addGroup(layout.createSequentialGroup().addGroup(layout
                                            .createParallelGroup(Alignment.LEADING)
                                            .addComponent(Password_TextField, GroupLayout.DEFAULT_SIZE, 250,
                                                    Short.MAX_VALUE)
                                            .addComponent(Confirm_Password_TextField, GroupLayout.DEFAULT_SIZE,
                                                    250, Short.MAX_VALUE)
                                            .addGroup(layout.createSequentialGroup().addComponent(Cancel_Button)
                                                    .addPreferredGap(ComponentPlacement.RELATED, 112,
                                                            Short.MAX_VALUE)
                                                    .addComponent(Register_Button))
                                            .addComponent(Username_Label)
                                            .addComponent(Username_TextField, 250, 250, Short.MAX_VALUE)
                                            .addComponent(Email_TextField, GroupLayout.DEFAULT_SIZE, 250,
                                                    Short.MAX_VALUE)
                                            .addComponent(Email_Confirm_TextField, GroupLayout.DEFAULT_SIZE,
                                                    250, Short.MAX_VALUE))
                                            .addGap(83)))))));
    layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(Username_Label)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(Username_TextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.UNRELATED).addComponent(Email_Label)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(Email_TextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.UNRELATED).addComponent(Email_Confirm_Label).addGap(10)
                    .addComponent(Email_Confirm_TextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(Password_Label)
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addComponent(Password_TextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.UNRELATED).addComponent(Confirm_Password_Label)
                    .addGap(11)
                    .addComponent(Confirm_Password_TextField, GroupLayout.PREFERRED_SIZE,
                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                    .addGap(18).addGroup(layout.createParallelGroup(Alignment.BASELINE)
                            .addComponent(Cancel_Button).addComponent(Register_Button))
                    .addContainerGap(26, Short.MAX_VALUE)));
    getContentPane().setLayout(layout);

    pack();
}

From source file:org.nekorp.workflow.desktop.view.EventoFinServicioView.java

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

    nombreEvento = new org.nekorp.workflow.desktop.view.binding.SimpleBindableJLabel();
    jToolBar1 = new javax.swing.JToolBar();
    evidencia = new javax.swing.JButton();
    borrar = new javax.swing.JButton();
    jLabel6 = new javax.swing.JLabel();
    fechaCreacionLabel = new org.nekorp.workflow.desktop.view.binding.FormatedJLabel(dateConverter);
    jLabel2 = new javax.swing.JLabel();
    responsable = new org.nekorp.workflow.desktop.view.binding.SimpleBindableJTextField();
    jScrollPane1 = new org.nekorp.workflow.desktop.view.resource.imp.MouseFreeJScrollPane();
    detalle = new org.nekorp.workflow.desktop.view.binding.SimpleBindableJTextArea();

    setBackground(new java.awt.Color(255, 255, 255));
    setMaximumSize(new java.awt.Dimension(32767, 91));

    nombreEvento.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
    nombreEvento.setText("Cancelacin");

    jToolBar1.setBackground(new java.awt.Color(255, 255, 255));
    jToolBar1.setFloatable(false);
    jToolBar1.setRollover(true);

    evidencia.setBackground(new java.awt.Color(255, 255, 255));
    evidencia.setText("Evidencias");
    evidencia.setFocusable(false);
    evidencia.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    evidencia.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    evidencia.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            evidenciaActionPerformed(evt);
        }
    });
    jToolBar1.add(evidencia);

    borrar.setBackground(new java.awt.Color(255, 255, 255));
    borrar.setText("Borrar");
    borrar.setFocusable(false);
    borrar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    borrar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    borrar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            borrarActionPerformed(evt);
        }
    });
    jToolBar1.add(borrar);

    jLabel6.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
    jLabel6.setText("Fecha :");

    fechaCreacionLabel.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
    fechaCreacionLabel.setText("12/12/2012");

    jLabel2.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
    jLabel2.setText("Responsable");

    responsable.setBackground(new java.awt.Color(224, 230, 230));
    responsable.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
    responsable.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(224, 230, 230), 4));

    jScrollPane1.setBorder(null);
    jScrollPane1.setWheelScrollingEnabled(false);

    detalle.setBackground(new java.awt.Color(224, 230, 230));
    detalle.setColumns(20);
    detalle.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
    detalle.setRows(2);
    jScrollPane1.setViewportView(detalle);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1)
                            .addGroup(layout.createSequentialGroup().addComponent(nombreEvento)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup().addComponent(jLabel6)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(fechaCreacionLabel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18).addComponent(jLabel2)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(responsable, javax.swing.GroupLayout.DEFAULT_SIZE, 266,
                                            Short.MAX_VALUE)))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(nombreEvento).addComponent(jToolBar1,
                                    javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6).addComponent(fechaCreacionLabel).addComponent(jLabel2)
                            .addComponent(responsable, javax.swing.GroupLayout.PREFERRED_SIZE, 20,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));
}

From source file:com.a544jh.kanamemory.ui.ProfileChooserPanel.java

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

    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    profilesList = new javax.swing.JList();
    loadProfileButton = new javax.swing.JButton();
    jLabel2 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    createProfileButton = new javax.swing.JButton();
    jLabel3 = new javax.swing.JLabel();
    deleteButton = new javax.swing.JButton();

    setPreferredSize(new java.awt.Dimension(500, 600));

    jLabel1.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
    jLabel1.setText("Choose Profile");

    profilesList.setModel(new javax.swing.AbstractListModel() {
        String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };

        public int getSize() {
            return strings.length;
        }

        public Object getElementAt(int i) {
            return strings[i];
        }
    });
    profilesList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    profilesList.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            profilesListMouseClicked(evt);
        }
    });
    jScrollPane1.setViewportView(profilesList);

    loadProfileButton.setText("Load");
    loadProfileButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            loadProfileButtonActionPerformed(evt);
        }
    });

    jLabel2.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
    jLabel2.setText("Create new");

    jTextField1.addCaretListener(new javax.swing.event.CaretListener() {
        public void caretUpdate(javax.swing.event.CaretEvent evt) {
            jTextField1CaretUpdate(evt);
        }
    });
    jTextField1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jTextField1ActionPerformed(evt);
        }
    });

    createProfileButton.setText("Create");
    createProfileButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            createProfileButtonActionPerformed(evt);
        }
    });

    jLabel3.setText("Name:");

    deleteButton.setText("Delete");
    deleteButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            deleteButtonActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    layout.createSequentialGroup().addComponent(deleteButton)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(loadProfileButton))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    layout.createSequentialGroup().addComponent(jLabel3)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jTextField1)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(createProfileButton))
                            .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel1).addComponent(jLabel2))
                                    .addGap(0, 283, Short.MAX_VALUE)))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(loadProfileButton).addComponent(deleteButton))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel2)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(createProfileButton).addComponent(jLabel3))
                    .addContainerGap(324, Short.MAX_VALUE)));
}

From source file:JavaMail.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 v a  2s  .  c o  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jTextField2 = new javax.swing.JTextField();
    jTextField3 = new javax.swing.JTextField();
    jTextField1 = new javax.swing.JTextField();
    jLabel4 = new javax.swing.JLabel();
    prov = new javax.swing.JComboBox();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Email Send Client");
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowOpened(java.awt.event.WindowEvent evt) {
            formWindowOpened(evt);
        }
    });

    jLabel1.setText("From");

    jLabel2.setText("To");

    jLabel3.setText("Subject");

    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    jScrollPane1.setViewportView(jTextArea1);

    jButton1.setText("Send Mail");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });

    jButton2.setText("Exit");

    jLabel4.setText("Provider");

    prov.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Gmail", "Outlook", "Yahoo" }));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addComponent(jButton1)
                                    .addGap(18, 18, 18).addComponent(jButton2).addGap(7, 7, 7))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            layout.createSequentialGroup()
                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 602,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap())
                    .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(layout.createSequentialGroup().addComponent(jLabel3).addGap(
                                            18, 18, 18).addComponent(jTextField3,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, 548, Short.MAX_VALUE))
                                    .addGroup(layout.createSequentialGroup().addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel1).addComponent(jLabel2)).addGap(30, 30, 30)
                                            .addGroup(layout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(jTextField2).addComponent(jTextField1))))
                            .addGroup(layout.createSequentialGroup().addComponent(jLabel4)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(prov, javax.swing.GroupLayout.PREFERRED_SIZE, 327,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(20, 20, 20).addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2).addComponent(jTextField2,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4).addComponent(prov, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 305,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton1).addComponent(jButton2))
                    .addGap(21, 21, 21)));

    pack();
}

From source file:br.com.renatoccosta.regexrenamer.view.FrmAbout.java

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

    imgLogo = new javax.swing.JLabel();
    lblTitle = new javax.swing.JLabel();
    lblSubtitle = new javax.swing.JLabel();
    pnlDescription = new javax.swing.JScrollPane();
    txtDescription = new javax.swing.JTextPane();
    txtDeveloper = new javax.swing.JLabel();
    txtHomepage = new javax.swing.JLabel();
    txtBlog = new javax.swing.JLabel();
    pnlInfo = new javax.swing.JScrollPane();
    txtInfo = new javax.swing.JTextArea();
    btnOk = new javax.swing.JButton();

    setResizable(false);
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent evt) {
            closeDialog(evt);
        }
    });

    imgLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon_48.png"))); // NOI18N

    lblTitle.setFont(new java.awt.Font("Arial", 0, 36)); // NOI18N
    lblTitle.setForeground(new java.awt.Color(102, 102, 102));
    java.util.ResourceBundle bundle = java.util.ResourceBundle
            .getBundle("br/com/renatoccosta/regexrenamer/i18n/Messages"); // NOI18N
    lblTitle.setText(bundle.getString("FrmAbout.lblTitle.text")); // NOI18N

    lblSubtitle.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    lblSubtitle.setText(bundle.getString("FrmAbout.lblSubtitle.text")); // NOI18N

    pnlDescription.setBorder(null);
    pnlDescription.setOpaque(false);

    txtDescription.setContentType(bundle.getString("FrmAbout.txtDescription.contentType")); // NOI18N
    txtDescription.setText(bundle.getString("FrmAbout.txtDescription.text")); // NOI18N
    txtDescription.setOpaque(false);
    pnlDescription.setViewportView(txtDescription);

    txtDeveloper.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    txtDeveloper.setText(bundle.getString("FrmAbout.txtDeveloper.text")); // NOI18N

    txtHomepage.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    txtHomepage.setText(bundle.getString("FrmAbout.txtHomepage.text")); // NOI18N

    txtBlog.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    txtBlog.setText(bundle.getString("FrmAbout.txtBlog.text")); // NOI18N

    pnlInfo.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    pnlInfo.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);

    txtInfo.setColumns(20);
    txtInfo.setRows(3);
    txtInfo.setText(bundle.getString("FrmAbout.txtInfo.text")); // NOI18N
    pnlInfo.setViewportView(txtInfo);

    btnOk.setText(bundle.getString("FrmAbout.btnOk.text")); // NOI18N
    btnOk.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnOkActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(pnlDescription, javax.swing.GroupLayout.Alignment.LEADING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, 464, Short.MAX_VALUE)
                    .addComponent(pnlInfo, javax.swing.GroupLayout.Alignment.LEADING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, 464, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                            .addComponent(imgLogo).addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblTitle).addComponent(lblSubtitle)))
                    .addComponent(btnOk, javax.swing.GroupLayout.PREFERRED_SIZE, 67,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtBlog, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtHomepage, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtDeveloper, javax.swing.GroupLayout.Alignment.LEADING)).addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(lblTitle)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(lblSubtitle))
                            .addGroup(layout.createSequentialGroup().addGap(21, 21, 21).addComponent(imgLogo)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
                    .addComponent(pnlDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 130,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18).addComponent(txtDeveloper)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(txtHomepage)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(txtBlog)
                    .addGap(18, 18, 18)
                    .addComponent(pnlInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 84,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(btnOk)
                    .addContainerGap()));

    java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
    setBounds((screenSize.width - 488) / 2, (screenSize.height - 514) / 2, 488, 514);
}

From source file:com.employee.scheduler.nurserostering.swingui.NurseRosteringPanel.java

public NurseRosteringPanel() {
    employeeIcon = new ImageIcon(getClass().getResource("employee.png"));
    deleteEmployeeIcon = new ImageIcon(getClass().getResource("deleteEmployee.png"));
    GroupLayout layout = new GroupLayout(this);
    setLayout(layout);/*from   w  w w. ja va2  s  .c  om*/
    createEmployeeListPanel();
    JPanel headerPanel = createHeaderPanel();
    layout.setHorizontalGroup(
            layout.createParallelGroup().addComponent(headerPanel).addComponent(employeeListPanel));
    layout.setVerticalGroup(layout.createSequentialGroup()
            .addComponent(headerPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                    GroupLayout.PREFERRED_SIZE)
            .addComponent(employeeListPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                    GroupLayout.PREFERRED_SIZE));
}

From source file:com.ecrimebureau.Web.JIFPing.java

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

    jSplitPane1 = new javax.swing.JSplitPane();
    jPanel2 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jTFIP = new javax.swing.JTextField();
    jBPing = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    jSpinner1 = new javax.swing.JSpinner();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jSpinnerN = new javax.swing.JSpinner();
    jLabel3 = new javax.swing.JLabel();
    jSpinner3 = new javax.swing.JSpinner();
    jLabel4 = new javax.swing.JLabel();
    jSpinner4 = new javax.swing.JSpinner();

    setClosable(true);
    setIconifiable(true);
    setMaximizable(true);
    setResizable(true);
    setTitle("Ping");
    getContentPane().setLayout(new java.awt.CardLayout());

    jSplitPane1.setDividerLocation(450);

    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    jScrollPane1.setViewportView(jTextArea1);

    jTFIP.setText("127.0.0.1");

    jBPing.setText("Ping");
    jBPing.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jBPingActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addGap(195, 195, 195).addComponent(jBPing).addGap(0,
                    50, Short.MAX_VALUE))
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTFIP, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane1))
                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jTFIP, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jBPing)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 396, Short.MAX_VALUE)));

    jSplitPane1.setLeftComponent(jPanel2);

    jPanel1.setBorder(null);

    jSpinner1.setToolTipText("Number of times to ping");

    jLabel1.setText("-t");

    jLabel2.setText("-n");

    jSpinnerN.setToolTipText("Number of echo requests to send.");
    jSpinnerN.setValue(5);
    jSpinnerN.setVerifyInputWhenFocusTarget(false);

    jLabel3.setText("-l");

    jLabel4.setText("-f");

    jSpinner4.setToolTipText("Don't Fragment flag in packet (IPv4-only).");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel3)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel1)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel2)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jSpinnerN, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel4)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jSpinner4, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(72, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1)
                    .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2).addComponent(jSpinnerN, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jSpinner4, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                    .addContainerGap(408, Short.MAX_VALUE)));

    jSplitPane1.setRightComponent(jPanel1);

    getContentPane().add(jSplitPane1, "card2");

    pack();
}

From source file:com.cactus.ClientChatGUI.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor./*from  ww  w .  ja v a 2  s .c  o  m*/
 */

// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    Message_Area = new JTextField();
    Send_Button = new JButton();
    Back_Button = new JButton();
    jScrollPane1 = new JScrollPane();
    Chat_Area = new JTextArea();

    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

    Send_Button.setText("Send");
    Send_Button.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            try {
                Send_ButtonActionPerformed(evt);
            } catch (ClientProtocolException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (UnsupportedEncodingException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
    });

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

    try {
        updateChatBox();
    } catch (ClientProtocolException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (JSONException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    Back_Button.setText("Back");
    Back_Button.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            Back_ButtonActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new GroupLayout(getContentPane());
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.TRAILING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.TRAILING)
                    .addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 412, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(
                                    Message_Area, GroupLayout.PREFERRED_SIZE, 337, GroupLayout.PREFERRED_SIZE)
                            .addGap(18)
                            .addGroup(layout.createParallelGroup(Alignment.TRAILING, false)
                                    .addComponent(Back_Button, 0, 0, Short.MAX_VALUE).addComponent(Send_Button,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                            Short.MAX_VALUE))))
            .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(Alignment.TRAILING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE).addGap(18)
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addComponent(Send_Button)
                            .addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(Back_Button))
                    .addComponent(Message_Area, GroupLayout.PREFERRED_SIZE, 68, GroupLayout.PREFERRED_SIZE))
            .addContainerGap()));
    getContentPane().setLayout(layout);

    pack();
}