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:Login.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 va2  s.  com
 */
@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();
    un = new javax.swing.JTextField();
    pa = new javax.swing.JPasswordField();
    btnLogin = new javax.swing.JButton();
    jButton1 = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jLabel1.setText("Username");

    jLabel2.setText("Password");

    btnLogin.setText("Login");
    btnLogin.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnLoginActionPerformed(evt);
        }
    });

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

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(54, 54, 54)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(layout.createSequentialGroup().addComponent(jLabel2).addGap(18, 18, 18)
                                    .addComponent(pa, javax.swing.GroupLayout.PREFERRED_SIZE, 93,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup().addComponent(jLabel1).addGap(18, 18, 18)
                                    .addComponent(un)))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup().addGap(46, 46, 46).addComponent(btnLogin)
                                    .addContainerGap(18, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    layout.createSequentialGroup()
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jButton1).addContainerGap()))));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addGap(45, 45, 45)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel1)
                                    .addComponent(un, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup().addGap(59, 59, 59).addComponent(btnLogin)))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel2)
                                            .addComponent(pa, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addContainerGap(24, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    layout.createSequentialGroup()
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jButton1).addContainerGap()))));

    pack();
}

From source file:interfaceTisseoWS.ST4.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 va2s  .c om
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jScrollPane1 = new javax.swing.JScrollPane();
    listeStations = new javax.swing.JList();
    lblName = new javax.swing.JLabel();
    lblStatus = new javax.swing.JLabel();
    lblBikeStands = new javax.swing.JLabel();
    lblBikes = new javax.swing.JLabel();
    lblAddress = new javax.swing.JLabel();
    jButton1 = new javax.swing.JButton();

    setTitle("ST4");

    listeStations.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
        public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
            listeStationsValueChanged(evt);
        }
    });
    jScrollPane1.setViewportView(listeStations);

    lblName.setText("Station ");

    lblStatus.setText("Statut ");

    lblBikeStands.setText("Points d'attache disponibles");

    lblBikes.setText("Vlos disponibles");

    lblAddress.setText("Adresse");

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

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 312,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup().addGap(18, 18, 18).addGroup(layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblName).addComponent(lblStatus).addComponent(lblBikeStands)
                                    .addComponent(lblBikes).addComponent(lblAddress))
                                    .addContainerGap(109, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    layout.createSequentialGroup()
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jButton1).addContainerGap()))));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup().addComponent(lblName).addGap(18, 18, 18)
                                    .addComponent(lblAddress).addGap(18, 18, 18).addComponent(lblStatus)
                                    .addGap(18, 18, 18).addComponent(lblBikeStands).addGap(18, 18, 18)
                                    .addComponent(lblBikes)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 231,
                                            Short.MAX_VALUE)
                                    .addComponent(jButton1))
                            .addComponent(jScrollPane1))
                    .addContainerGap()));

    pack();
}

From source file:ip.ui.LearningParamsInputPanel.java

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

    learningRateLabel = new javax.swing.JLabel();
    momentumFactorLabel = new javax.swing.JLabel();
    maxEpochNumLabel = new javax.swing.JLabel();
    errorThresholdLabel = new javax.swing.JLabel();
    momentumFactorInput = new javax.swing.JTextField();
    learningRateInput = new javax.swing.JTextField();
    maxEpochNumInput = new javax.swing.JTextField();
    errorThresholdInput = new javax.swing.JTextField();

    learningRateLabel.setText("Wspczynnik nauki:");

    momentumFactorLabel.setText("Wspczynnik momentum:");

    maxEpochNumLabel.setText("Maksymalna liczba epok:");

    errorThresholdLabel.setText("Docelowy bd:");

    momentumFactorInput.setText("0.8");

    learningRateInput.setText("0.1");

    maxEpochNumInput.setText("1000");

    errorThresholdInput.setText("0.001");

    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, false)
                    .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(momentumFactorLabel).addComponent(learningRateLabel))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(learningRateInput, javax.swing.GroupLayout.DEFAULT_SIZE, 40,
                                            Short.MAX_VALUE)
                                    .addComponent(momentumFactorInput)))
                    .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(maxEpochNumLabel).addComponent(errorThresholdLabel))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(maxEpochNumInput, javax.swing.GroupLayout.DEFAULT_SIZE, 41,
                                            Short.MAX_VALUE)
                                    .addComponent(errorThresholdInput))))
                    .addContainerGap(202, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(learningRateLabel)
                            .addComponent(learningRateInput, 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(momentumFactorLabel).addComponent(momentumFactorInput,
                                    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(maxEpochNumLabel).addComponent(maxEpochNumInput,
                                    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(errorThresholdLabel).addComponent(errorThresholdInput,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
}

From source file:com.MainChart.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 . co m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setBackground(new java.awt.Color(102, 102, 102));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0,
            725, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 552,
            Short.MAX_VALUE));

    pack();
    setLocationRelativeTo(null);
}

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

    jLabel1 = new javax.swing.JLabel();
    jPanel9 = new javax.swing.JPanel();
    jTGenre = new javax.swing.JTextField();
    jPanel10 = new javax.swing.JPanel();
    jPanel7 = new javax.swing.JPanel();
    jPanel11 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Nouveau genre");
    getContentPane().setLayout(new java.awt.GridLayout(2, 3));

    jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel1.setText("Nom");
    getContentPane().add(jLabel1);

    javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
    jPanel9.setLayout(jPanel9Layout);
    jPanel9Layout.setHorizontalGroup(jPanel9Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 176, Short.MAX_VALUE));
    jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 189, Short.MAX_VALUE));

    getContentPane().add(jPanel9);

    jTGenre.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTGenre.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jTGenreActionPerformed(evt);
        }
    });
    getContentPane().add(jTGenre);

    javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
    jPanel10.setLayout(jPanel10Layout);
    jPanel10Layout.setHorizontalGroup(jPanel10Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 176, Short.MAX_VALUE));
    jPanel10Layout.setVerticalGroup(jPanel10Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 189, Short.MAX_VALUE));

    getContentPane().add(jPanel10);

    javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
    jPanel7.setLayout(jPanel7Layout);
    jPanel7Layout.setHorizontalGroup(jPanel7Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 176, Short.MAX_VALUE));
    jPanel7Layout.setVerticalGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 189, Short.MAX_VALUE));

    getContentPane().add(jPanel7);

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

    javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
    jPanel11.setLayout(jPanel11Layout);
    jPanel11Layout
            .setHorizontalGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel11Layout.createSequentialGroup().addGap(24, 24, 24)
                            .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 129,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(23, Short.MAX_VALUE)));
    jPanel11Layout
            .setVerticalGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel11Layout.createSequentialGroup().addGap(70, 70, 70).addComponent(jButton1)
                            .addContainerGap(96, Short.MAX_VALUE)));

    getContentPane().add(jPanel11);

    pack();
}

From source file:view.PrograssCharts.java

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

    jPanel1 = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    getContentPane().setLayout(null);

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 1290, Short.MAX_VALUE));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 710, Short.MAX_VALUE));

    getContentPane().add(jPanel1);
    jPanel1.setBounds(0, -1, 1290, 710);

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 1290, Short.MAX_VALUE));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 710, Short.MAX_VALUE));

    getContentPane().add(jPanel2);
    jPanel2.setBounds(0, 0, 1290, 710);

    pack();
}

From source file:it.unibas.spicygui.vista.BestMappingsTopComponent.java

private void initComponents() {

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0,
            400, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 300,
            Short.MAX_VALUE));//from   w w w  . j  av a  2  s.com
}

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

    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    jButton2 = new javax.swing.JButton();
    jButton1 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jTable1.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {
            { new Integer(111), new Integer(222), new Integer(333), new Integer(444), new Integer(555) },
            { new Integer(122), new Integer(222), new Integer(333), new Integer(444), new Integer(555) },
            { new Integer(111), new Integer(222), new Integer(333), new Integer(444), new Integer(555) },
            { new Integer(111), new Integer(333), new Integer(222), new Integer(444), new Integer(555) } },
            new String[] { "Title 1", "Title 2", "Title 3", "Title 4", "Title5" }) {
        Class[] types = new Class[] { java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class,
                java.lang.Integer.class, java.lang.Integer.class };

        public Class getColumnClass(int columnIndex) {
            return types[columnIndex];
        }
    });
    jScrollPane1.setViewportView(jTable1);

    jButton2.setText("Pie chart");
    jButton2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
        }
    });

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

    jButton3.setText("Bar Chart");
    jButton3.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton3ActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap(290, Short.MAX_VALUE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    layout.createSequentialGroup()
                                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addContainerGap())
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    layout.createSequentialGroup().addComponent(jButton1).addGap(55, 55, 55)
                                            .addComponent(jButton2).addGap(64, 64, 64).addComponent(jButton3)
                                            .addGap(55, 55, 55)))));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(38, 38, 38)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 144,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(41, 41, 41)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton2).addComponent(jButton1).addComponent(jButton3))
                    .addContainerGap(279, Short.MAX_VALUE)));

    pack();
}

From source file:com.cactus.ClientLoginGUI.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*/
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

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

    Username_TextField = new JTextField();
    Password_TextField = new JPasswordField();
    Username_Label = new JLabel();
    Password_label = new JLabel();
    Login_Button = new JButton();
    Register_Button = new JButton();

    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

    Username_TextField.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            Username_TextFieldActionPerformed(evt);
        }
    });

    Password_TextField.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            Password_TextFieldActionPerformed(evt);
        }
    });

    Username_Label.setText("Username:");

    Password_label.setText("Password:");

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

    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();
            }
        }
    });

    javax.swing.GroupLayout layout = new GroupLayout(getContentPane());
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addGap(101)
            .addGroup(layout.createParallelGroup(Alignment.LEADING, false).addComponent(Password_label)
                    .addComponent(Username_TextField)
                    .addComponent(Password_TextField, GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup().addComponent(Register_Button)
                            .addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(Login_Button))
                    .addComponent(Username_Label, GroupLayout.PREFERRED_SIZE, 109, GroupLayout.PREFERRED_SIZE))
            .addContainerGap(128, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(71).addComponent(Username_Label)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(Username_TextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addGap(27).addComponent(Password_label).addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(Password_TextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addGap(33).addGroup(layout.createParallelGroup(Alignment.BASELINE)
                            .addComponent(Register_Button).addComponent(Login_Button))
                    .addContainerGap(48, Short.MAX_VALUE)));
    getContentPane().setLayout(layout);

    pack();
}

From source file:com.github.alexfalappa.nbspringboot.projects.customizer.BootPanel.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 2  s. c  o m
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    lDevtools = new javax.swing.JLabel();
    chDevtools = new javax.swing.JCheckBox();
    lArgs = new javax.swing.JLabel();
    txArgs = new javax.swing.JTextField();

    org.openide.awt.Mnemonics.setLocalizedText(lDevtools,
            org.openide.util.NbBundle.getBundle(BootPanel.class).getString("BootPanel.lDevtools.text")); // NOI18N

    org.openide.awt.Mnemonics.setLocalizedText(chDevtools,
            org.openide.util.NbBundle.getBundle(BootPanel.class).getString("BootPanel.chDevtools.text")); // NOI18N
    chDevtools.setEnabled(false);
    chDevtools.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            chDevtoolsActionPerformed(evt);
        }
    });

    org.openide.awt.Mnemonics.setLocalizedText(lArgs,
            org.openide.util.NbBundle.getBundle(BootPanel.class).getString("BootPanel.lArgs.text")); // NOI18N

    txArgs.setColumns(15);
    txArgs.setEnabled(false);

    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(lDevtools).addComponent(lArgs))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(
                                    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(layout.createSequentialGroup().addComponent(chDevtools)
                                                    .addGap(0, 0, Short.MAX_VALUE))
                                            .addComponent(txArgs))
                            .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lArgs).addComponent(txArgs, 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(lDevtools).addComponent(chDevtools))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
}