Example usage for javax.swing GroupLayout setVerticalGroup

List of usage examples for javax.swing GroupLayout setVerticalGroup

Introduction

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

Prototype

public void setVerticalGroup(Group group) 

Source Link

Document

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

Usage

From source file:io.github.jeddict.jpa.modeler.specification.model.workspace.WorkSpaceDialog.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 ava 2 s .c o  m
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    classGenerationPanel = new EntityMappingMemberPanel("WorkSpace Entities", scene);
    action_LayeredPane = new javax.swing.JLayeredPane();
    save_Button = new javax.swing.JButton();
    cancel_Button = new javax.swing.JButton();
    nameLayeredPane = new javax.swing.JLayeredPane();
    nameLabel = new javax.swing.JLabel();
    nameTextField = new javax.swing.JTextField();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle(org.openide.util.NbBundle.getMessage(WorkSpaceDialog.class, "WorkSpaceDialog.title")); // NOI18N
    setIconImage(WORKSPACE_ICON.getImage());

    javax.swing.GroupLayout classGenerationPanelLayout = new javax.swing.GroupLayout(classGenerationPanel);
    classGenerationPanel.setLayout(classGenerationPanelLayout);
    classGenerationPanelLayout.setHorizontalGroup(classGenerationPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    classGenerationPanelLayout.setVerticalGroup(classGenerationPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 460, Short.MAX_VALUE));

    org.openide.awt.Mnemonics.setLocalizedText(save_Button, getSaveButtonText());
    save_Button.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            save_ButtonActionPerformed(evt);
        }
    });
    setDefaultButton(save_Button);

    org.openide.awt.Mnemonics.setLocalizedText(cancel_Button,
            org.openide.util.NbBundle.getMessage(WorkSpaceDialog.class, "WorkSpaceDialog.cancel_Button.text")); // NOI18N
    cancel_Button.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cancel_ButtonActionPerformed(evt);
        }
    });

    action_LayeredPane.setLayer(save_Button, javax.swing.JLayeredPane.DEFAULT_LAYER);
    action_LayeredPane.setLayer(cancel_Button, javax.swing.JLayeredPane.DEFAULT_LAYER);

    javax.swing.GroupLayout action_LayeredPaneLayout = new javax.swing.GroupLayout(action_LayeredPane);
    action_LayeredPane.setLayout(action_LayeredPaneLayout);
    action_LayeredPaneLayout.setHorizontalGroup(
            action_LayeredPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(action_LayeredPaneLayout.createSequentialGroup()
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(save_Button)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(cancel_Button)));
    action_LayeredPaneLayout.setVerticalGroup(
            action_LayeredPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(action_LayeredPaneLayout.createSequentialGroup()
                            .addGroup(action_LayeredPaneLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(save_Button).addComponent(cancel_Button))
                            .addGap(0, 8, Short.MAX_VALUE)));

    org.openide.awt.Mnemonics.setLocalizedText(nameLabel,
            org.openide.util.NbBundle.getMessage(WorkSpaceDialog.class, "WorkSpaceDialog.nameLabel.text")); // NOI18N

    nameTextField.setText(
            org.openide.util.NbBundle.getMessage(WorkSpaceDialog.class, "WorkSpaceDialog.nameTextField.text")); // NOI18N

    nameLayeredPane.setLayer(nameLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
    nameLayeredPane.setLayer(nameTextField, javax.swing.JLayeredPane.DEFAULT_LAYER);

    javax.swing.GroupLayout nameLayeredPaneLayout = new javax.swing.GroupLayout(nameLayeredPane);
    nameLayeredPane.setLayout(nameLayeredPaneLayout);
    nameLayeredPaneLayout.setHorizontalGroup(nameLayeredPaneLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(nameLayeredPaneLayout.createSequentialGroup().addGap(2, 2, 2).addComponent(nameLabel)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(nameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE)
                    .addGap(14, 14, 14)));
    nameLayeredPaneLayout.setVerticalGroup(nameLayeredPaneLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(nameLayeredPaneLayout.createSequentialGroup().addGroup(nameLayeredPaneLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(nameLabel)
                    .addComponent(nameTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(0, 9, Short.MAX_VALUE)));

    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(classGenerationPanel, javax.swing.GroupLayout.Alignment.LEADING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
                            layout.createSequentialGroup().addComponent(nameLayeredPane)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(action_LayeredPane, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(classGenerationPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(action_LayeredPane, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(nameLayeredPane, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))));

    pack();
}

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

    jButton2 = new javax.swing.JButton();
    jButton1 = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

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

    jButton1.setText("Cerrar");
    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(605, Short.MAX_VALUE)
                    .addComponent(jButton2).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 84,
                            javax.swing.GroupLayout.PREFERRED_SIZE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap(319, Short.MAX_VALUE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton1).addComponent(jButton2))));

    pack();
}

From source file:analisisnumerico.Main.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.//w w  w . jav a2 s  .co  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();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    jButton4 = new javax.swing.JButton();
    jButton5 = new javax.swing.JButton();
    jButton6 = new javax.swing.JButton();
    jButton7 = new javax.swing.JButton();
    jButton8 = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setPreferredSize(new java.awt.Dimension(804, 490));

    jPanel1.setPreferredSize(new java.awt.Dimension(516, 377));

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

    jPanel2.setBackground(new java.awt.Color(219, 68, 55));

    jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cerrar.png"))); // NOI18N

    jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/minimizar.png"))); // NOI18N

    jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/atras.png"))); // NOI18N

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel2Layout.createSequentialGroup().addComponent(jButton3)
                                    .addContainerGap())
                            .addGroup(jPanel2Layout.createSequentialGroup().addComponent(jButton2)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 32,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(20, 20, 20)))));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jButton1).addComponent(jButton2))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton3).addContainerGap()));

    jButton1.setBorderPainted(false);
    jButton1.setContentAreaFilled(false);
    jButton1.setFocusPainted(false);
    jButton1.setFocusable(false);
    jButton2.setBorderPainted(false);
    jButton2.setContentAreaFilled(false);
    jButton2.setFocusPainted(false);
    jButton2.setFocusable(false);
    jButton3.setBorderPainted(false);
    jButton3.setContentAreaFilled(false);
    jButton3.setFocusPainted(false);
    jButton3.setFocusable(false);

    jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/evaluar.png"))); // NOI18N

    jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/graficar.png"))); // NOI18N

    jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Biseccion.png"))); // NOI18N

    jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/secante.png"))); // NOI18N

    jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/newton-rapshon.png"))); // NOI18N

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 543,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton7, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton8, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                    Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup().addGap(68, 68, 68)
                                    .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 46,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jButton5).addGap(18, 18, 18).addComponent(jButton6)
                                    .addGap(18, 18, 18).addComponent(jButton7).addGap(18, 18, 18)
                                    .addComponent(jButton8).addGap(0, 0, 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(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 389,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)))));

    jPanel2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mousePressed(java.awt.event.MouseEvent evt) {
            jPanel2MousePressed(evt);
        }
    });
    jPanel2.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
        public void mouseDragged(java.awt.event.MouseEvent evt) {
            jPanel2MouseDragged(evt);
        }
    });
    jButton4.setBorderPainted(false);
    jButton4.setText("");
    jButton4.setContentAreaFilled(false);
    jButton4.setFocusPainted(false);
    jButton4.setFocusable(false);
    jButton5.setBorderPainted(false);
    jButton5.setText("");
    jButton5.setContentAreaFilled(false);
    jButton5.setFocusPainted(false);
    jButton5.setFocusable(false);
    jButton6.setBorderPainted(false);
    jButton6.setText("");
    jButton6.setContentAreaFilled(false);
    jButton6.setFocusPainted(false);
    jButton6.setFocusable(false);
    jButton7.setBorderPainted(false);
    jButton7.setText("");
    jButton7.setContentAreaFilled(false);
    jButton7.setFocusPainted(false);
    jButton7.setFocusable(false);
    jButton8.setBorderPainted(false);
    jButton8.setText("");
    jButton8.setContentAreaFilled(false);
    jButton8.setFocusPainted(false);
    jButton8.setFocusable(false);

    pack();
}

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

    jScrollPane1 = new javax.swing.JScrollPane();
    jTableInfoCSV = new javax.swing.JTable();
    jButtonVerGrafica = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jComboBoxContador = new javax.swing.JComboBox<>();
    panel = new javax.swing.JPanel();

    jTableInfoCSV.setModel(new javax.swing.table.DefaultTableModel(
            new Object[][] { { null, null, null, null, null }, { null, null, null, null, null } },
            new String[] { "Fecha", "Hora", "Nmero de serie", "Lectura", "Contador" }) {
        boolean[] canEdit = new boolean[] { false, false, false, false, false };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
        }
    });
    jScrollPane1.setViewportView(jTableInfoCSV);

    jButtonVerGrafica.setText("Ver Grfica");
    jButtonVerGrafica.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonVerGraficaActionPerformed(evt);
        }
    });

    jLabel1.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
    jLabel1.setText("Seleccionar contador");

    javax.swing.GroupLayout panelLayout = new javax.swing.GroupLayout(panel);
    panel.setLayout(panelLayout);
    panelLayout.setHorizontalGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));
    panelLayout.setVerticalGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 331, Short.MAX_VALUE));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addGap(40, 40, 40).addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 186,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jComboBoxContador, javax.swing.GroupLayout.PREFERRED_SIZE, 313,
                            javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 396, Short.MAX_VALUE)
                    .addComponent(jButtonVerGrafica).addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(30, 30, 30).addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jComboBoxContador, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 245,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jButtonVerGrafica).addContainerGap())
                            .addGroup(layout.createSequentialGroup().addGap(18, 18, 18)
                                    .addComponent(panel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap(32, Short.MAX_VALUE)))));
}

From source file:org.nekorp.workflow.desktop.view.AppLayoutView.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  .  jav  a 2  s  .  c  om*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jPanel1 = new javax.swing.JPanel();
    jToolBar2 = new javax.swing.JToolBar();
    nuevoButton = new javax.swing.JButton();
    buscarButton = new javax.swing.JButton();
    formatoProgramacionButton = new javax.swing.JButton();
    reporteGlobalButton = new javax.swing.JButton();
    jPanel3 = new javax.swing.JPanel();
    leftPanel = new javax.swing.JPanel();
    contenidoView = new javax.swing.JPanel();
    rightPanel = new javax.swing.JPanel();

    jPanel1.setBackground(new java.awt.Color(0, 0, 0));

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

    jToolBar2.setBackground(new java.awt.Color(0, 0, 0));
    jToolBar2.setFloatable(false);
    jToolBar2.setRollover(true);

    nuevoButton.setBackground(new java.awt.Color(0, 0, 0));
    nuevoButton.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
    nuevoButton.setForeground(new java.awt.Color(255, 255, 255));
    nuevoButton.setText("Nuevo");
    nuevoButton.setFocusable(false);
    nuevoButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    nuevoButton.setMinimumSize(new java.awt.Dimension(40, 40));
    nuevoButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    nuevoButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            nuevoButtonActionPerformed(evt);
        }
    });
    jToolBar2.add(nuevoButton);

    buscarButton.setBackground(new java.awt.Color(0, 0, 0));
    buscarButton.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
    buscarButton.setForeground(new java.awt.Color(255, 255, 255));
    buscarButton.setText("Buscar");
    buscarButton.setFocusable(false);
    buscarButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    buscarButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    buscarButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buscarButtonActionPerformed(evt);
        }
    });
    jToolBar2.add(buscarButton);

    formatoProgramacionButton.setBackground(new java.awt.Color(0, 0, 0));
    formatoProgramacionButton.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
    formatoProgramacionButton.setForeground(new java.awt.Color(255, 255, 255));
    formatoProgramacionButton.setText("Formato de Programacin");
    formatoProgramacionButton.setFocusable(false);
    formatoProgramacionButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    formatoProgramacionButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    formatoProgramacionButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            formatoProgramacionButtonActionPerformed(evt);
        }
    });
    jToolBar2.add(formatoProgramacionButton);

    reporteGlobalButton.setBackground(new java.awt.Color(0, 0, 0));
    reporteGlobalButton.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
    reporteGlobalButton.setForeground(new java.awt.Color(255, 255, 255));
    reporteGlobalButton.setText("Reporte Global");
    reporteGlobalButton.setFocusable(false);
    reporteGlobalButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    reporteGlobalButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    reporteGlobalButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            reporteGlobalButtonActionPerformed(evt);
        }
    });
    jToolBar2.add(reporteGlobalButton);

    jPanel3.setBackground(new java.awt.Color(0, 0, 0));

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 174, Short.MAX_VALUE));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE));

    leftPanel.setBackground(new java.awt.Color(51, 51, 51));
    leftPanel.setLayout(new java.awt.BorderLayout());

    contenidoView.setBackground(new java.awt.Color(255, 255, 255));
    contenidoView.setLayout(new java.awt.BorderLayout());

    rightPanel.setBackground(new java.awt.Color(51, 51, 51));
    rightPanel.setLayout(new java.awt.BorderLayout());

    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, false)
                            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(leftPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(jToolBar2, javax.swing.GroupLayout.DEFAULT_SIZE, 638,
                                            Short.MAX_VALUE)
                                    .addGap(0, 0, 0).addComponent(jPanel3,
                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(contenidoView, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addGap(0, 0, 0).addComponent(rightPanel,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 174,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jToolBar2, javax.swing.GroupLayout.Alignment.TRAILING,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(leftPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 440, Short.MAX_VALUE)
                            .addComponent(contenidoView, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(rightPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))));
}

From source file:vista.DestinosMasConsultados.java

public void iniciarGraficos(CategoryDataset dataset) {
    // create the chart...
    final JFreeChart chart = ChartFactory.createBarChart("Paises mas consultados", // chart title
            "Paises", // domain axis label
            "Cantidad de consultas", // range axis label
            dataset, // data
            PlotOrientation.VERTICAL, // orientation
            true, // include legend
            true, // tooltips?
            false // URLs?
    );/* w  w  w.  j a  v a  2s .  c  o  m*/

    // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...

    // set the background color for the chart...
    chart.setBackgroundPaint(Color.white);

    // get a reference to the plot for further customisation...
    final CategoryPlot plot = chart.getCategoryPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setRangeGridlinePaint(Color.white);

    // set the range axis to display integers only...
    final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    // disable bar outlines...
    final BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(false);

    // set up gradient paints for series...
    final GradientPaint gp0 = new GradientPaint(0.0f, 0.0f, Color.blue, 0.0f, 0.0f, Color.lightGray);
    final GradientPaint gp1 = new GradientPaint(0.0f, 0.0f, Color.green, 0.0f, 0.0f, Color.lightGray);
    final GradientPaint gp2 = new GradientPaint(0.0f, 0.0f, Color.red, 0.0f, 0.0f, Color.lightGray);
    renderer.setSeriesPaint(0, gp0);
    renderer.setSeriesPaint(1, gp1);
    renderer.setSeriesPaint(2, gp2);

    final CategoryAxis domainAxis = plot.getDomainAxis();
    domainAxis.setCategoryLabelPositions(CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0));

    ChartPanel chartFinal = new ChartPanel(chart);
    chartFinal.setSize(new Dimension(600, 400));

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(panelDestinosMasConsultados);
    panelDestinosMasConsultados.setLayout(jPanel1Layout);
    jPanel1Layout
            .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addGap(0, 0, 0).addComponent(chartFinal)
                            .addContainerGap(0, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGap(0, 0, 0).addComponent(chartFinal)
                    .addContainerGap(0, Short.MAX_VALUE)));

}

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

    stBT = new javax.swing.JButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    valuePane = new javax.swing.JTextArea();
    graphPanel = new javax.swing.JPanel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    stBT.setText("START");
    stBT.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stBTActionPerformed(evt);
        }
    });

    valuePane.setColumns(20);
    valuePane.setRows(5);
    valuePane.addInputMethodListener(new java.awt.event.InputMethodListener() {
        public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {
        }

        public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
            valuePaneInputMethodTextChanged(evt);
        }
    });
    jScrollPane1.setViewportView(valuePane);

    javax.swing.GroupLayout graphPanelLayout = new javax.swing.GroupLayout(graphPanel);
    graphPanel.setLayout(graphPanelLayout);
    graphPanelLayout.setHorizontalGroup(graphPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 590, Short.MAX_VALUE));
    graphPanelLayout.setVerticalGroup(graphPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));

    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()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                    .addGap(0, 0, Short.MAX_VALUE).addComponent(stBT).addGap(36, 36, 36))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    layout.createSequentialGroup()
                                            .addComponent(graphPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    274, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addContainerGap()))));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(graphPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 489,
                                    Short.MAX_VALUE))
                    .addGap(18, 18, 18).addComponent(stBT).addGap(27, 27, 27)));

    pack();
}

From source file:MyFormApp.java

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

    jPanel2 = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    jPanel1 = new javax.swing.JPanel();
    Openbutton = new javax.swing.JButton();
    Addbutton = new javax.swing.JButton();
    Removebutton = new javax.swing.JButton();
    jScrollPane2 = new javax.swing.JScrollPane();
    jList2 = new javax.swing.JList<Book>();
    btLogout = new javax.swing.JButton();
    jPanel5 = new javax.swing.JPanel();

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);/*from w w w  .  j ava2 s  .c o m*/
    jPanel2Layout.setHorizontalGroup(jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 900, Short.MAX_VALUE));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 530, Short.MAX_VALUE));

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jTabbedPane1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

    jPanel1.setBackground(new java.awt.Color(102, 153, 255));
    jPanel1.setLayout(null);

    Openbutton.setText("Open");
    Openbutton.setPreferredSize(new java.awt.Dimension(60, 30));
    Openbutton.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            OpenbuttonMouseClicked(evt);
        }
    });
    jPanel1.add(Openbutton);
    Openbutton.setBounds(660, 100, 110, 40);

    Addbutton.setText("Add");
    Addbutton.setPreferredSize(new java.awt.Dimension(60, 30));
    Addbutton.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            AddbuttonMouseClicked(evt);
        }
    });
    Addbutton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            AddbuttonActionPerformed(evt);
        }
    });
    jPanel1.add(Addbutton);
    Addbutton.setBounds(661, 150, 110, 40);

    Removebutton.setText("Remove");
    Removebutton.setPreferredSize(new java.awt.Dimension(60, 30));
    Removebutton.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            RemovebuttonMouseClicked(evt);
        }
    });
    jPanel1.add(Removebutton);
    Removebutton.setBounds(660, 200, 110, 40);

    jList2.setBackground(new java.awt.Color(204, 204, 204));

    jList2.addAncestorListener(new javax.swing.event.AncestorListener() {
        public void ancestorMoved(javax.swing.event.AncestorEvent evt) {
        }

        public void ancestorAdded(javax.swing.event.AncestorEvent evt) {
            jList2AncestorAdded(evt);
        }

        public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {
        }
    });
    jScrollPane2.setViewportView(jList2);

    jPanel1.add(jScrollPane2);
    jScrollPane2.setBounds(60, 80, 540, 432);

    btLogout.setText("Logout");
    btLogout.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btLogoutActionPerformed(evt);
        }
    });
    jPanel1.add(btLogout);
    btLogout.setBounds(660, 260, 110, 50);

    jTabbedPane1.addTab("      main     ", jPanel1);

    jPanel5.setBackground(new java.awt.Color(102, 153, 255));
    jPanel5.setLayout(new javax.swing.OverlayLayout(jPanel5));
    jTabbedPane1.addTab("       Display PDF     ", jPanel5);

    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().addComponent(jTabbedPane1).addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addComponent(jTabbedPane1).addContainerGap()));

    setBounds(0, 0, 1074, 830);
}

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

    mainPanel = new javax.swing.JPanel();
    stepButton = new javax.swing.JButton();
    runButton = new javax.swing.JToggleButton();
    intervalSlider = new javax.swing.JSlider();
    renderPanel = new javax.swing.JPanel();
    restartButton = new javax.swing.JButton();
    timeBar = new javax.swing.JProgressBar();
    timeField = new javax.swing.JTextField();
    seedSpinner = new javax.swing.JSpinner();
    solutionPath = new javax.swing.JLabel();
    jbotPath = new javax.swing.JLabel();
    seedIncCheck = new javax.swing.JCheckBox();
    fitnessField = new javax.swing.JTextField();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("JBotPlayer");

    mainPanel.setMinimumSize(new java.awt.Dimension(400, 400));
    mainPanel.setPreferredSize(new java.awt.Dimension(700, 796));

    stepButton.setText("Step");
    stepButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stepButtonActionPerformed(evt);
        }
    });

    runButton.setText("Run");
    runButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            runButtonActionPerformed(evt);
        }
    });

    intervalSlider.setMajorTickSpacing(20);
    intervalSlider.setMinorTickSpacing(10);
    intervalSlider.setPaintLabels(true);
    intervalSlider.setPaintTicks(true);
    intervalSlider.setValue(30);

    renderPanel.setPreferredSize(new java.awt.Dimension(700, 700));

    javax.swing.GroupLayout renderPanelLayout = new javax.swing.GroupLayout(renderPanel);
    renderPanel.setLayout(renderPanelLayout);
    renderPanelLayout.setHorizontalGroup(renderPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 700, Short.MAX_VALUE));
    renderPanelLayout.setVerticalGroup(renderPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 694, Short.MAX_VALUE));

    restartButton.setText("Restart");
    restartButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            restartButtonActionPerformed(evt);
        }
    });

    timeField.setEditable(false);
    timeField.setText("0");

    solutionPath.setText("jLabel1");

    jbotPath.setText("jLabel2");

    seedIncCheck.setSelected(true);

    fitnessField.setEditable(false);

    javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
    mainPanel.setLayout(mainPanelLayout);
    mainPanelLayout.setHorizontalGroup(mainPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainPanelLayout.createSequentialGroup()
                    .addComponent(stepButton, javax.swing.GroupLayout.PREFERRED_SIZE, 75,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(runButton, javax.swing.GroupLayout.PREFERRED_SIZE, 75,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(restartButton, javax.swing.GroupLayout.PREFERRED_SIZE, 75,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(seedSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 60,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(seedIncCheck)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(intervalSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(timeBar, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(timeField,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(mainPanelLayout.createSequentialGroup()
                    .addComponent(renderPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE))
            .addGroup(mainPanelLayout.createSequentialGroup()
                    .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(solutionPath).addComponent(jbotPath))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(fitnessField, javax.swing.GroupLayout.PREFERRED_SIZE, 150,
                            javax.swing.GroupLayout.PREFERRED_SIZE)));
    mainPanelLayout.setVerticalGroup(mainPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainPanelLayout.createSequentialGroup().addGroup(mainPanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(seedIncCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 31,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(stepButton).addComponent(runButton).addComponent(restartButton)
                            .addComponent(seedSpinner, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(intervalSlider, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(mainPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(timeBar, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(timeField, javax.swing.GroupLayout.Alignment.LEADING)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(renderPanel, 694, 694, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(mainPanelLayout.createSequentialGroup().addComponent(solutionPath)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jbotPath))
                            .addComponent(fitnessField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                    Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
            mainPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 812, javax.swing.GroupLayout.PREFERRED_SIZE));

    pack();
}

From source file:volker.streaming.music.gui.ApiPanel.java

private void initComponents() {

    URL onUrl = getClass().getResource("on.png");
    onIcon = getIcon(onUrl);//  w w w . j a  v  a 2s .co m
    URL offUrl = getClass().getResource("off.png");
    offIcon = getIcon(offUrl);

    statusButton = new JButton();
    statusLabel = new JLabel("Start/Stop:");
    stateLabel = new JLabel(status.get() ? RUNNING : STOPPED);
    iconBorder = BorderFactory.createEmptyBorder();
    textBorder = statusButton.getBorder();
    statusButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            synchronized (status) {
                // status is only set here
                status.set(!status.get());
            }
            showUpdatedStatus();
        }
    });
    showUpdatedStatus();

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.CENTER)
                    .addComponent(statusLabel, GroupLayout.Alignment.CENTER)
                    .addComponent(statusButton, GroupLayout.Alignment.CENTER)
                    .addComponent(stateLabel, GroupLayout.Alignment.CENTER))
            .addContainerGap());

    layout.setVerticalGroup(layout.createSequentialGroup().addContainerGap().addComponent(statusLabel)
            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(statusButton)
            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(stateLabel)
            .addContainerGap());
}