Example usage for javax.swing GroupLayout PREFERRED_SIZE

List of usage examples for javax.swing GroupLayout PREFERRED_SIZE

Introduction

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

Prototype

int PREFERRED_SIZE

To view the source code for javax.swing GroupLayout PREFERRED_SIZE.

Click Source Link

Document

Indicates the preferred size from the component or gap should be used for a particular range value.

Usage

From source file:au.org.ala.delta.editor.ui.ImageDetailsPanel.java

private void createUI() {
    JPanel panel = new JPanel();

    JPanel buttonPanel = new JPanel();

    JPanel panel_2 = new JPanel();
    GroupLayout groupLayout = new GroupLayout(this);
    groupLayout.setHorizontalGroup(groupLayout.createParallelGroup(Alignment.LEADING)
            .addGroup(groupLayout.createSequentialGroup().addContainerGap()
                    .addComponent(panel, GroupLayout.PREFERRED_SIZE, 262, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(buttonPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(panel_2, GroupLayout.PREFERRED_SIZE, 265, Short.MAX_VALUE)
                    .addContainerGap()));
    groupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
            .addGroup(groupLayout.createSequentialGroup().addContainerGap()
                    .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                            .addComponent(panel, GroupLayout.DEFAULT_SIZE, 238, Short.MAX_VALUE)
                            .addComponent(buttonPanel, 0, 0, Short.MAX_VALUE)
                            .addComponent(panel_2, 0, 0, Short.MAX_VALUE))
                    .addContainerGap()));

    btnSettings = new JButton();
    btnDisplay = new JButton();
    btnAdd = new JButton();
    btnDelete = new JButton();

    GroupLayout gl_buttonPanel = new GroupLayout(buttonPanel);
    gl_buttonPanel.setHorizontalGroup(gl_buttonPanel.createParallelGroup(Alignment.TRAILING).addGroup(
            Alignment.LEADING,/*from  w w w.  j  a  v  a 2s.  c  om*/
            gl_buttonPanel.createSequentialGroup().addContainerGap().addGroup(gl_buttonPanel
                    .createParallelGroup(Alignment.LEADING)
                    .addComponent(btnSettings, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addComponent(btnDisplay, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)
                    .addComponent(btnAdd, GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)
                    .addComponent(btnDelete, GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE))
                    .addContainerGap()));
    gl_buttonPanel.setVerticalGroup(gl_buttonPanel.createParallelGroup(Alignment.TRAILING)
            .addGroup(gl_buttonPanel.createSequentialGroup().addContainerGap(119, Short.MAX_VALUE)
                    .addComponent(btnSettings).addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(btnDisplay).addPreferredGap(ComponentPlacement.RELATED).addComponent(btnAdd)
                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(btnDelete).addContainerGap()));
    buttonPanel.setLayout(gl_buttonPanel);

    JLabel lblSubjectText = new JLabel();
    lblSubjectText.setName("imageDetailsSubjectLabel");

    JScrollPane scrollPane_1 = new JScrollPane();

    JLabel lblDevelopersNotes = new JLabel();
    lblDevelopersNotes.setName("imageDetailsDevelopersNotesLabel");

    JScrollPane scrollPane_2 = new JScrollPane();

    JPanel panel_3 = new JPanel();

    String title = _resources.getString("imageDetailsSoundTitle");

    panel_3.setBorder(new TitledBorder(null, title, TitledBorder.LEADING, TitledBorder.TOP, null, null));

    GroupLayout gl_panel_2 = new GroupLayout(panel_2);
    gl_panel_2.setHorizontalGroup(gl_panel_2.createParallelGroup(Alignment.TRAILING)
            .addGroup(gl_panel_2.createSequentialGroup().addContainerGap()
                    .addGroup(gl_panel_2.createParallelGroup(Alignment.LEADING)
                            .addComponent(scrollPane_2, GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE)
                            .addComponent(scrollPane_1, GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE)
                            .addComponent(lblDevelopersNotes)
                            .addComponent(panel_3, GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE)
                            .addComponent(lblSubjectText))
                    .addContainerGap()));
    gl_panel_2.setVerticalGroup(gl_panel_2.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panel_2.createSequentialGroup().addContainerGap().addComponent(lblSubjectText)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(scrollPane_1, GroupLayout.DEFAULT_SIZE, 41, Short.MAX_VALUE)
                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(lblDevelopersNotes)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(scrollPane_2, GroupLayout.DEFAULT_SIZE, 54, Short.MAX_VALUE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(panel_3, GroupLayout.PREFERRED_SIZE, 66, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    developerNotesTextPane = new RtfEditorPane();
    scrollPane_2.setViewportView(developerNotesTextPane);

    subjectTextPane = new RtfEditorPane();
    scrollPane_1.setViewportView(subjectTextPane);

    soundComboBox = new JComboBox();
    soundComboBox.setRenderer(new DefaultListCellRenderer() {
        private static final long serialVersionUID = 1L;

        @Override
        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                boolean cellHasFocus) {
            String text = "";
            ImageOverlay overlay = (ImageOverlay) value;
            if (overlay != null) {
                text = overlay.overlayText;
            }
            super.getListCellRendererComponent(list, text, index, isSelected, cellHasFocus);
            return this;
        }
    });

    deleteSoundButton = new JButton();

    playSoundButton = new JButton();

    insertSoundButton = new JButton();
    GroupLayout gl_panel_3 = new GroupLayout(panel_3);
    gl_panel_3.setHorizontalGroup(gl_panel_3.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panel_3.createSequentialGroup().addComponent(soundComboBox, 0, 0, Short.MAX_VALUE)
                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(deleteSoundButton)
                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(playSoundButton)
                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(insertSoundButton)
                    .addContainerGap()));
    gl_panel_3.setVerticalGroup(gl_panel_3.createParallelGroup(Alignment.TRAILING)
            .addGroup(gl_panel_3.createSequentialGroup().addContainerGap(5, Short.MAX_VALUE)
                    .addGroup(gl_panel_3.createParallelGroup(Alignment.BASELINE)
                            .addComponent(soundComboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(deleteSoundButton).addComponent(playSoundButton)
                            .addComponent(insertSoundButton))));
    panel_3.setLayout(gl_panel_3);

    panel_2.setLayout(gl_panel_2);

    JLabel lblImageFiles = new JLabel();
    lblImageFiles.setName("imageDetailsImageFilesLabel");
    lblImageFiles.setAlignmentY(Component.TOP_ALIGNMENT);

    JScrollPane scrollPane = new JScrollPane();
    GroupLayout gl_panel = new GroupLayout(panel);
    gl_panel.setHorizontalGroup(gl_panel.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panel.createSequentialGroup()
                    .addGroup(gl_panel.createParallelGroup(Alignment.LEADING).addComponent(lblImageFiles)
                            .addComponent(scrollPane, GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE))
                    .addContainerGap()));
    gl_panel.setVerticalGroup(gl_panel.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panel.createSequentialGroup().addContainerGap().addComponent(lblImageFiles)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(scrollPane, GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE)
                    .addContainerGap()));

    imageList = new ImageList();

    scrollPane.setViewportView(imageList);
    panel.setLayout(gl_panel);
    setLayout(groupLayout);
}

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

    cantidadIntervalos = new javax.swing.ButtonGroup();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    cantidadNumeros = new javax.swing.JTextField();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jRadioButton1 = new javax.swing.JRadioButton();
    jRadioButton2 = new javax.swing.JRadioButton();
    jRadioButton3 = new javax.swing.JRadioButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    tabla = new javax.swing.JTable();
    jButton1 = new javax.swing.JButton();
    button_graficar = new javax.swing.JButton();
    jScrollPane3 = new javax.swing.JScrollPane();
    tabla2 = new javax.swing.JTable();

    jTable1.setModel(
            new javax.swing.table.DefaultTableModel(
                    new Object[][] { { null, null, null, null }, { null, null, null, null },
                            { null, null, null, null }, { null, null, null, null } },
                    new String[] { "Title 1", "Title 2", "Title 3", "Title 4" }));
    jScrollPane2.setViewportView(jTable1);

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Simulacin");

    cantidadNumeros.setName("cantidadNumeros"); // NOI18N

    jLabel1.setText("Cantidad de numeros");

    jLabel2.setText("Cantidad de intervalos");

    cantidadIntervalos.add(jRadioButton1);
    jRadioButton1.setText("5");

    cantidadIntervalos.add(jRadioButton2);
    jRadioButton2.setText("10");

    cantidadIntervalos.add(jRadioButton3);
    jRadioButton3.setText("20");

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

    }, new String[] {

    }));
    jScrollPane1.setViewportView(tabla);

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

    button_graficar.setText("Graficar");
    button_graficar.setEnabled(false);
    button_graficar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            button_graficarActionPerformed(evt);
        }
    });

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

    }, new String[] {

    }));
    jScrollPane3.setViewportView(tabla2);

    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, false)
                            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jRadioButton3).addComponent(jRadioButton2).addComponent(jRadioButton1)
                            .addComponent(jLabel2).addComponent(jButton1).addComponent(button_graficar)
                            .addComponent(cantidadNumeros))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE)
                    .addGap(20, 20, 20)));
    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(jLabel1)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(cantidadNumeros, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18).addComponent(jLabel2)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jRadioButton1)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jRadioButton2)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jRadioButton3).addGap(29, 29, 29).addComponent(jButton1)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(button_graficar).addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup().addGap(19, 19, 19)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    538, Short.MAX_VALUE)
                                            .addComponent(jScrollPane3))))
                    .addContainerGap()));

    pack();
    setLocationRelativeTo(null);
}

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

    inputLabel = new javax.swing.JLabel();
    fileNameField = new javax.swing.JTextField();
    fileDialogBtn = new javax.swing.JButton();
    processBtn = new javax.swing.JButton();
    progressBar = new javax.swing.JProgressBar();
    jScrollPane1 = new javax.swing.JScrollPane();
    logPane = new javax.swing.JTextPane();
    titleLabel = new javax.swing.JLabel();
    jLabel1 = new javax.swing.JLabel();
    minQualField = new javax.swing.JTextField();
    jLabel2 = new javax.swing.JLabel();
    maxNCField = new javax.swing.JTextField();

    inputLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
    inputLabel.setLabelFor(inputLabel);
    inputLabel.setText("Input");

    fileNameField.setName("fileName"); // NOI18N

    fileDialogBtn.setText("...");
    fileDialogBtn.setName("fileDialogButton"); // NOI18N
    fileDialogBtn.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            fileDialogBtnActionPerformed(evt);
        }
    });

    processBtn.setFont(new java.awt.Font("Ubuntu", 1, 24)); // NOI18N
    processBtn.setText("Process");
    processBtn.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            processBtnActionPerformed(evt);
        }
    });

    logPane.setEditable(false);
    logPane.setText("Select the ZIP file with the VCF's and then click in Process \nto create the matrix.\n");
    jScrollPane1.setViewportView(logPane);

    titleLabel.setFont(new java.awt.Font("Ubuntu", 0, 24)); // NOI18N
    titleLabel.setText("Licorice 1.6 (blue sapphire)");

    jLabel1.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
    jLabel1.setText("Min. Quality");

    minQualField.setText("30");
    minQualField.setToolTipText("Minimum Variant Quality");

    jLabel2.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
    jLabel2.setText("Maximum Nocall Rate");

    maxNCField.setText("0.95");
    maxNCField.setToolTipText("Minimum Variant Quality");

    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(32, 32, 32).addGroup(layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1143,
                                    Short.MAX_VALUE)
                            .addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup().addComponent(inputLabel).addGap(57, 57, 57)
                                    .addComponent(fileNameField)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(fileDialogBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 65,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup().addGroup(layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(titleLabel)
                                    .addGroup(layout.createSequentialGroup().addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel1).addComponent(jLabel2)).addGap(79, 79, 79)
                                            .addGroup(layout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(maxNCField,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 56,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(minQualField,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 56,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE))))
                                    .addGap(0, 0, Short.MAX_VALUE))))
                    .addGroup(layout.createSequentialGroup().addGap(466, 466, 466)
                            .addComponent(processBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 213,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(15, 15, 15).addComponent(titleLabel)
                    .addGap(12, 12, 12)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(fileNameField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(fileDialogBtn).addComponent(inputLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1).addComponent(minQualField,
                                    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(jLabel2).addComponent(maxNCField,
                                    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(processBtn)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18).addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 558,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));
}

From source file:TextFieldDemo.java

/**
 * This method is called from within the constructor to initialize the form.
 *///ww w .  j av a 2  s. c om

private void initComponents() {
    entry = new JTextField();
    textArea = new JTextArea();
    status = new JLabel();
    jLabel1 = new JLabel();

    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    setTitle("TextFieldDemo");

    textArea.setColumns(20);
    textArea.setLineWrap(true);
    textArea.setRows(5);
    textArea.setWrapStyleWord(true);
    textArea.setEditable(false);
    jScrollPane1 = new JScrollPane(textArea);

    jLabel1.setText("Enter text to search:");

    GroupLayout layout = new GroupLayout(getContentPane());
    getContentPane().setLayout(layout);

    // Create a parallel group for the horizontal axis
    ParallelGroup hGroup = layout.createParallelGroup(GroupLayout.Alignment.LEADING);

    // Create a sequential and a parallel groups
    SequentialGroup h1 = layout.createSequentialGroup();
    ParallelGroup h2 = layout.createParallelGroup(GroupLayout.Alignment.TRAILING);

    // Add a container gap to the sequential group h1
    h1.addContainerGap();

    // Add a scroll pane and a label to the parallel group h2
    h2.addComponent(jScrollPane1, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 450,
            Short.MAX_VALUE);
    h2.addComponent(status, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE);

    // Create a sequential group h3
    SequentialGroup h3 = layout.createSequentialGroup();
    h3.addComponent(jLabel1);
    h3.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED);
    h3.addComponent(entry, GroupLayout.DEFAULT_SIZE, 321, Short.MAX_VALUE);

    // Add the group h3 to the group h2
    h2.addGroup(h3);
    // Add the group h2 to the group h1
    h1.addGroup(h2);

    h1.addContainerGap();

    // Add the group h1 to the hGroup
    hGroup.addGroup(GroupLayout.Alignment.TRAILING, h1);
    // Create the horizontal group
    layout.setHorizontalGroup(hGroup);

    // Create a parallel group for the vertical axis
    ParallelGroup vGroup = layout.createParallelGroup(GroupLayout.Alignment.LEADING);
    // Create a sequential group v1
    SequentialGroup v1 = layout.createSequentialGroup();
    // Add a container gap to the sequential group v1
    v1.addContainerGap();
    // Create a parallel group v2
    ParallelGroup v2 = layout.createParallelGroup(GroupLayout.Alignment.BASELINE);
    v2.addComponent(jLabel1);
    v2.addComponent(entry, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE);
    // Add the group v2 tp the group v1
    v1.addGroup(v2);
    v1.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED);
    v1.addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 233, Short.MAX_VALUE);
    v1.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED);
    v1.addComponent(status);
    v1.addContainerGap();

    // Add the group v1 to the group vGroup
    vGroup.addGroup(v1);
    // Create the vertical group
    layout.setVerticalGroup(vGroup);
    pack();
}

From source file:br.com.utfpr.pb.view.RelatorioPedidosView.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 va  2s  .com*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jPanel1 = new javax.swing.JPanel();
    jButtonFechar = new javax.swing.JButton();
    jButtonGerar = new javax.swing.JButton();
    jPanel3 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    pessoa = new javax.swing.JComboBox<>();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    dataIni = new org.jdesktop.swingx.JXDatePicker();
    dataFim = new org.jdesktop.swingx.JXDatePicker();

    setClosable(true);
    setIconifiable(true);
    setMaximizable(true);
    setTitle("Relatrio de Pedidos");

    jButtonFechar.setText("Fechar");
    jButtonFechar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonFecharActionPerformed(evt);
        }
    });

    jButtonGerar.setText("Gerar");
    jButtonGerar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonGerarActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout
            .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(jButtonGerar)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jButtonFechar).addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButtonFechar).addComponent(jButtonGerar))
                    .addContainerGap()));

    jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Filtros"));

    jLabel1.setText("Pessoa *");

    pessoa.setModel(
            new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

    jLabel2.setText("Data inicial *");

    jLabel3.setText("Data final *");

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel3).addComponent(jLabel2).addComponent(jLabel1))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pessoa, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                    .addGroup(jPanel3Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(dataIni, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(dataFim, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(0, 263, Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1).addComponent(pessoa, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2).addComponent(dataIni, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3).addComponent(dataFim, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(59, Short.MAX_VALUE)));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                    Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jPanel3,
                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));

    pack();
}

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

    lblReporting = new javax.swing.JLabel();
    jComboBox1 = new javax.swing.JComboBox();
    btnLancerStat = new javax.swing.JButton();
    panelHistogramme = new javax.swing.JPanel();
    lblPopu = new javax.swing.JLabel();
    btnRetour = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    lblReporting.setBackground(new java.awt.Color(153, 153, 153));
    lblReporting.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
    lblReporting.setText("Reporting");

    jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Choisir une population",
            "Nombre d'employ par tranches de salaires", "Nombre d'employ par service",
            "Nombre d'employ par spcialit", "Nombre d'employ par rotation",
            "Salaire des employs par service", "Nombre de malades par service",
            "Nombre de malades par mutuelle", "Nombre de chambres par service" }));
    jComboBox1.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jComboBox1ItemStateChanged(evt);
        }
    });
    jComboBox1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jComboBox1ActionPerformed(evt);
        }
    });

    btnLancerStat.setBackground(new java.awt.Color(0, 102, 0));
    btnLancerStat.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
    btnLancerStat.setText("Lancer l'tude");
    btnLancerStat.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnLancerStatActionPerformed(evt);
        }
    });

    panelHistogramme.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

    javax.swing.GroupLayout panelHistogrammeLayout = new javax.swing.GroupLayout(panelHistogramme);
    panelHistogramme.setLayout(panelHistogrammeLayout);
    panelHistogrammeLayout.setHorizontalGroup(panelHistogrammeLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 490, Short.MAX_VALUE));
    panelHistogrammeLayout.setVerticalGroup(panelHistogrammeLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 300, Short.MAX_VALUE));

    lblPopu.setText("Population  tudier :");

    btnRetour.setBackground(new java.awt.Color(255, 0, 0));
    btnRetour.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    btnRetour.setText("Retour");
    btnRetour.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnRetourActionPerformed(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().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addGroup(layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(btnLancerStat, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnRetour, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGap(40, 40, 40)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(panelHistogramme, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout
                                            .createSequentialGroup()
                                            .addComponent(lblReporting, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    262, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(222, 222, 222))))
                    .addComponent(lblPopu, javax.swing.GroupLayout.PREFERRED_SIZE, 202,
                            javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(51, Short.MAX_VALUE)));
    layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addContainerGap()
                            .addComponent(lblReporting, javax.swing.GroupLayout.PREFERRED_SIZE, 70,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(14, 14, 14)
                            .addComponent(lblPopu, javax.swing.GroupLayout.PREFERRED_SIZE, 26,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(layout.createSequentialGroup()
                                            .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    32, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(64, 64, 64)
                                            .addComponent(btnLancerStat, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    51, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(53, 53, 53)
                                            .addComponent(btnRetour, javax.swing.GroupLayout.PREFERRED_SIZE, 54,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(48, 48, 48))
                                    .addComponent(panelHistogramme, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addContainerGap(43, Short.MAX_VALUE)));

    pack();
}

From source file:com.josescalia.tumblr.app.MainFrame.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  .  j  ava 2  s  .  c  o  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    jMenuItem1 = new javax.swing.JMenuItem();
    jMenuItem2 = new javax.swing.JMenuItem();
    mainPanel = new javax.swing.JPanel();
    jPanel1 = new javax.swing.JPanel();
    lblDate = new javax.swing.JLabel();
    progressBar = new javax.swing.JProgressBar();
    lblTime = new javax.swing.JLabel();
    lblMark = new javax.swing.JLabel();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu3 = new javax.swing.JMenu();
    mnTumblrImageViewer = new javax.swing.JMenuItem();
    jMenu1 = new javax.swing.JMenu();
    mnTumblrFavList = new javax.swing.JMenuItem();
    jMenu2 = new javax.swing.JMenu();
    mnConfiguration = new javax.swing.JMenuItem();
    mnHelp = new javax.swing.JMenuItem();
    jSeparator1 = new javax.swing.JPopupMenu.Separator();
    mnExit = new javax.swing.JMenuItem();

    jMenuItem1.setText("jMenuItem1");

    jMenuItem2.setText("jMenuItem2");

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setIconImage(new ImageIcon(getClass().getResource("/icons/tumblr.png")).getImage());
    setPreferredSize(new java.awt.Dimension(1360, 700));

    mainPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
    mainPanel.setLayout(mainPanelLayout);
    mainPanelLayout.setHorizontalGroup(mainPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    mainPanelLayout.setVerticalGroup(mainPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 652, Short.MAX_VALUE));

    jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    lblDate.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N

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

    progressBar.setString("");
    progressBar.setStringPainted(true);

    lblTime.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N

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

    lblMark.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N
    lblMark.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    lblMark.setToolTipText("");

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

    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()
                    .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 175,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(lblDate, javax.swing.GroupLayout.PREFERRED_SIZE, 105,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(lblTime, javax.swing.GroupLayout.PREFERRED_SIZE, 109,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 690, Short.MAX_VALUE)
                    .addComponent(lblMark, javax.swing.GroupLayout.PREFERRED_SIZE, 234,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGap(1, 1, 1).addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblDate, javax.swing.GroupLayout.Alignment.TRAILING,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(progressBar, javax.swing.GroupLayout.Alignment.TRAILING,
                            javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblTime, javax.swing.GroupLayout.Alignment.TRAILING,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblMark, javax.swing.GroupLayout.Alignment.TRAILING,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(3, 3, 3)));

    jMenu3.setText("Tumblr");

    mnTumblrImageViewer.setText("Tumblr Image Viewer");
    mnTumblrImageViewer.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            mnTumblrImageViewerActionPerformed(evt);
        }
    });
    jMenu3.add(mnTumblrImageViewer);

    jMenuBar1.add(jMenu3);

    jMenu1.setText("Favorite");

    mnTumblrFavList.setText("Tumblr Rss Fav List");
    mnTumblrFavList.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            mnTumblrFavListActionPerformed(evt);
        }
    });
    jMenu1.add(mnTumblrFavList);

    jMenuBar1.add(jMenu1);

    jMenu2.setText("System");

    mnConfiguration.setText("Configuration");
    mnConfiguration.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            mnConfigurationActionPerformed(evt);
        }
    });
    jMenu2.add(mnConfiguration);

    mnHelp.setText("Help");
    mnHelp.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            mnHelpActionPerformed(evt);
        }
    });
    jMenu2.add(mnHelp);
    jMenu2.add(jSeparator1);

    mnExit.setText("Exit");
    mnExit.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            mnExitActionPerformed(evt);
        }
    });
    jMenu2.add(mnExit);

    jMenuBar1.add(jMenu2);

    setJMenuBar(jMenuBar1);

    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(1, 1, 1)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(mainPanel, 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(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGap(1, 1, 1).addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));

    bindingGroup.bind();

    pack();
}

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

    jPanel1 = new javax.swing.JPanel();
    jButtonFechar = new javax.swing.JButton();
    jButtonGerar = new javax.swing.JButton();
    jPanel3 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    pessoa = new javax.swing.JComboBox<>();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    dataIni = new org.jdesktop.swingx.JXDatePicker();
    dataFim = new org.jdesktop.swingx.JXDatePicker();
    pendente = new javax.swing.JCheckBox();

    setClosable(true);
    setIconifiable(true);
    setMaximizable(true);
    setTitle("Relatrio de Contas");

    jButtonFechar.setText("Fechar");
    jButtonFechar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonFecharActionPerformed(evt);
        }
    });

    jButtonGerar.setText("Gerar");
    jButtonGerar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonGerarActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                    .addContainerGap().addComponent(jButtonGerar)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 375, Short.MAX_VALUE)
                    .addComponent(jButtonFechar).addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButtonFechar).addComponent(jButtonGerar))
                    .addContainerGap()));

    jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Filtros"));

    jLabel1.setText("Pessoa *");

    pessoa.setModel(
            new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

    jLabel2.setText("Data inicial *");

    jLabel3.setText("Data final *");

    pendente.setSelected(true);
    pendente.setText("Somente ttulos em aberto");

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel3).addComponent(jLabel2).addComponent(jLabel1))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pessoa, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                    .addGroup(jPanel3Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(pendente)
                                            .addComponent(dataIni, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(dataFim, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1).addComponent(pessoa, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2).addComponent(dataIni, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3).addComponent(dataFim, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(pendente).addContainerGap(25, Short.MAX_VALUE)));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                    Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jPanel3,
                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));

    pack();
}

From source file:com.chenjw.imagegrab.ui.MainFrame.java

public MainFrame() {
    {//from www  .j av  a2 s . c  om
        this.addWindowListener(new WindowAdapter() {

            @Override
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }

        });
    }

    GroupLayout configPanelLayout = new GroupLayout((JComponent) configPanel);
    configPanel.setLayout(configPanelLayout);
    configPanel.setPreferredSize(new java.awt.Dimension(1035, 726));
    {
        downloadButton = new JButton();
        downloadButton.setText("");
        downloadButton.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                executeService.execute(new Runnable() {
                    @Override
                    public void run() {
                        imagegrabService.grab();
                    }
                });

            }

        });
        downloadButton.registerKeyboardAction(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                executeService.execute(new Runnable() {
                    @Override
                    public void run() {
                        imagegrabService.grab();
                    }
                });
            }
        }, KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.CTRL_DOWN_MASK), JComponent.WHEN_IN_FOCUSED_WINDOW);
    }
    {
        jLabel1 = new JLabel();
        jLabel1.setText("??");
    }
    {
        resultScrollPane = new JScrollPane(resultPane);
        {
            resultPane = new JTextArea();
            resultScrollPane.setViewportView(resultPane);
        }
    }
    {
        sourceComboBox = new JComboBox();
    }
    {

        maxNumComboBox = new HistoryComboBox("maxNum");
    }
    {
        jLabel6 = new JLabel();
        jLabel6.setText("??");
    }
    {
        jLabel3 = new JLabel();
        jLabel3.setText("??");
    }

    {
        searchWordComboBox = new HistoryComboBox("searchWord");
    }
    configPanelLayout.setHorizontalGroup(configPanelLayout.createSequentialGroup().addContainerGap()
            .addGroup(configPanelLayout.createParallelGroup()
                    .addGroup(configPanelLayout.createSequentialGroup()
                            .addComponent(resultScrollPane, GroupLayout.PREFERRED_SIZE, 979,
                                    GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(GroupLayout.Alignment.LEADING, configPanelLayout.createSequentialGroup()
                            .addPreferredGap(resultScrollPane, jLabel1, LayoutStyle.ComponentPlacement.INDENT)
                            .addComponent(jLabel1, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(searchWordComboBox, 0, 213, Short.MAX_VALUE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel3, GroupLayout.PREFERRED_SIZE, 39, GroupLayout.PREFERRED_SIZE)
                            .addComponent(sourceComboBox, GroupLayout.PREFERRED_SIZE, 112,
                                    GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jLabel6, GroupLayout.PREFERRED_SIZE, 64, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(maxNumComboBox, GroupLayout.PREFERRED_SIZE, 72,
                                    GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(downloadButton, GroupLayout.PREFERRED_SIZE, 162,
                                    GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 164, GroupLayout.PREFERRED_SIZE)))
            .addContainerGap());
    configPanelLayout.setVerticalGroup(configPanelLayout.createSequentialGroup().addContainerGap()
            .addGroup(configPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 27,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 27,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(searchWordComboBox, GroupLayout.Alignment.BASELINE,
                            GroupLayout.PREFERRED_SIZE, 27, GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 27,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(sourceComboBox, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE,
                            27, GroupLayout.PREFERRED_SIZE)
                    .addComponent(downloadButton, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE,
                            27, GroupLayout.PREFERRED_SIZE)
                    .addComponent(maxNumComboBox, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE,
                            27, GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 698, GroupLayout.PREFERRED_SIZE)
            .addComponent(resultScrollPane, GroupLayout.PREFERRED_SIZE, 686, GroupLayout.PREFERRED_SIZE));
    //
    pack();
    this.setSize(1010, 768);
    setVisible(true);
    this.setTitle("?");
    getContentPane().add(configPanel, BorderLayout.CENTER);
    initSpring();
}

From source file:de.hsos.ecs.richwps.wpsmonitor.boundary.gui.controls.datasource.WpsDialog.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./*www. j  a  v a2 s  . co m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    JPanel jPanel1 = new JPanel();
    closeButton = new JButton();
    addToMonitorButton = new JButton();
    treeScrollPane = new JScrollPane();
    wpsTree = new JTree();
    JLabel jLabel1 = new JLabel();

    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("List of WPS-Servers- and Processes");
    setIconImage(new ImageIcon(getClass().getResource("/icons/database.png")).getImage());
    setMinimumSize(null);
    setName("wpsDialog"); // NOI18N
    setResizable(false);

    jPanel1.setBorder(BorderFactory.createTitledBorder(""));

    closeButton.setIcon(new ImageIcon(getClass().getResource("/icons/apply.png"))); // NOI18N
    closeButton.setText("Close");
    closeButton.setName("closeButton"); // NOI18N
    closeButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            closeButtonActionPerformed(evt);
        }
    });

    addToMonitorButton.setIcon(new ImageIcon(getClass().getResource("/icons/add.png"))); // NOI18N
    addToMonitorButton.setText("Add WPS with Processes");
    addToMonitorButton.setName("addToMonitorButton"); // NOI18N
    addToMonitorButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            addToMonitorButtonActionPerformed(evt);
        }
    });

    DefaultMutableTreeNode treeNode1 = new DefaultMutableTreeNode("root");
    wpsTree.setModel(new DefaultTreeModel(treeNode1));
    wpsTree.setName("wpsTree"); // NOI18N
    treeScrollPane.setViewportView(wpsTree);

    jLabel1.setText(
            "<html><body>Here is a list of all registered data-sources. You can pick up processes and WPS and add your choice to the monitor through the \"Add WPS with Processes\"-Button. If you select only a WPS, all processes of this WPS will also  be added. The processes will  be saved, but they have no Jobs or a testrequest.</body></html>");

    GroupLayout jPanel1Layout = new GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout
                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE)
                            .addComponent(addToMonitorButton)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(closeButton))
                    .addComponent(jLabel1, GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(treeScrollPane, GroupLayout.PREFERRED_SIZE, 630,
                                    GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel1Layout
            .setVerticalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                            .addComponent(jLabel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(treeScrollPane, GroupLayout.DEFAULT_SIZE, 382, Short.MAX_VALUE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(addToMonitorButton).addComponent(closeButton))
                            .addContainerGap()));

    GroupLayout layout = new GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel1, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel1, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));

    pack();
}