Example usage for javax.swing GroupLayout DEFAULT_SIZE

List of usage examples for javax.swing GroupLayout DEFAULT_SIZE

Introduction

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

Prototype

int DEFAULT_SIZE

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

Click Source Link

Document

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

Usage

From source file:com.antelink.sourcesquare.gui.view.ExitSourceSquareView.java

/**
 * Create the frame./*from  ww  w.  jav a 2s .co m*/
 */
public ExitSourceSquareView() {
    setIconImage(Toolkit.getDefaultToolkit().getImage(SourceSquareView.class.getResource("/antelink.png")));
    setTitle("SourceSquare");
    setResizable(false);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setBounds(100, 100, 500, 170);
    this.contentPane = new JPanel();
    this.contentPane.setBackground(Color.WHITE);
    this.contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    setContentPane(this.contentPane);

    this.mainPanel = new JPanel();
    this.mainPanel.setBackground(Color.WHITE);
    GroupLayout gl_contentPane = new GroupLayout(this.contentPane);
    gl_contentPane.setHorizontalGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
            .addComponent(this.mainPanel, GroupLayout.DEFAULT_SIZE, 428, Short.MAX_VALUE));
    gl_contentPane.setVerticalGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
            .addComponent(this.mainPanel, GroupLayout.DEFAULT_SIZE, 263, Short.MAX_VALUE));
    this.mainPanel.setLayout(new BoxLayout(this.mainPanel, BoxLayout.Y_AXIS));

    JPanel panel_1 = new JPanel();
    panel_1.setBackground(Color.WHITE);
    this.mainPanel.add(panel_1);
    panel_1.setLayout(new BorderLayout(0, 0));

    JPanel panel = new JPanel();
    panel.setLayout(new FlowLayout(FlowLayout.CENTER, 50, 20));
    panel.setBackground(Color.WHITE);
    panel_1.add(panel, BorderLayout.SOUTH);

    Image openButtonImage = Toolkit.getDefaultToolkit()
            .getImage(SourceSquareView.class.getResource("/OpenButton.png"));
    this.openButtonLabel = new JLabel(new ImageIcon(openButtonImage));
    this.openButtonLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    panel.add(this.openButtonLabel);

    JLabel exitLabel = new JLabel("<html><b>Closing this window will quit the application</b></html>");
    exitLabel.setFont(new Font("Helvetica", Font.PLAIN, 13));

    JLabel explainLabel = new JLabel("<html>(You won't be able to see or publish your results anymore)</html>");
    explainLabel.setFont(new Font("Helvetica", Font.PLAIN, 13));

    JPanel textPanel = new JPanel();
    textPanel.setBackground(Color.WHITE);
    textPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 0));

    textPanel.add(exitLabel, BorderLayout.CENTER);
    textPanel.add(explainLabel, BorderLayout.CENTER);

    panel_1.add(textPanel, BorderLayout.CENTER);

    CopyrightPanel copyrightPanel = new CopyrightPanel();
    copyrightPanel.setBackground(Color.WHITE);
    this.mainPanel.add(copyrightPanel);
    this.contentPane.setLayout(gl_contentPane);

    setLocationRelativeTo(null);
}

From source file:com.philips.cn.hr.pps.App.java

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

    uploadBtn1 = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    filePath1 = new javax.swing.JTextField();
    jLabel2 = new javax.swing.JLabel();
    filePath2 = new javax.swing.JTextField();
    uploadBtn2 = new javax.swing.JButton();
    jLabel3 = new javax.swing.JLabel();
    saveToPath = new javax.swing.JTextField();
    saveToBtn = new javax.swing.JButton();
    startCaclBtn = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Philips China PPS Automation");
    setType(java.awt.Window.Type.UTILITY);

    uploadBtn1.setText("choose");
    uploadBtn1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            uploadBtn1ActionPerformed(evt);
        }
    });

    jLabel1.setText("Employee basic salary file");

    jLabel2.setText("Employee AI file");

    uploadBtn2.setText("choose");
    uploadBtn2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            uploadBtn2ActionPerformed(evt);
        }
    });

    jLabel3.setText("Save to");

    saveToBtn.setText("choose");
    saveToBtn.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveToBtnActionPerformed(evt);
        }
    });

    startCaclBtn.setText("Start Calculation...");
    startCaclBtn.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            startCaclBtnActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup()
                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(startCaclBtn))
                            .addGroup(layout.createSequentialGroup().addGap(72, 72, 72)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel1).addComponent(jLabel2).addComponent(jLabel3))
                                    .addGap(42, 42, 42)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(filePath1).addComponent(filePath2)
                                            .addComponent(saveToPath, javax.swing.GroupLayout.DEFAULT_SIZE, 638,
                                                    Short.MAX_VALUE))))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(uploadBtn1).addComponent(uploadBtn2).addComponent(saveToBtn))
                    .addGap(66, 66, 66)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(35, 35, 35).addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1)
                    .addComponent(filePath1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(uploadBtn1)).addGap(29, 29, 29)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel2)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(filePath2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(uploadBtn2)))
                    .addGap(34, 34, 34)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(saveToPath, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(saveToBtn))
                    .addGap(36, 36, 36).addComponent(startCaclBtn)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    pack();
    setLocationRelativeTo(null);
}

From source file:com.pos.spatobiz.app.view.karyawan.DataKaryawan.java

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

    whiteLabel1 = new WhiteLabel();
    textSaring = new TextBoxTransfer();
    table = new Table();

    whiteLabel1.setText("Saring :");
    whiteLabel1.setName("whiteLabel1"); // NOI18N

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

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

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(Alignment.TRAILING, layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.TRAILING)
                    .addComponent(table, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 664, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(whiteLabel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(ComponentPlacement.RELATED)
                            .addComponent(textSaring, GroupLayout.DEFAULT_SIZE, 618, Short.MAX_VALUE)))
            .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(whiteLabel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(textSaring, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addComponent(table, GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE).addContainerGap()));
}

From source file:au.org.ala.delta.intkey.ui.WebSearchDialog.java

/**
 * Create the dialog.//from  ww w .j  av  a  2s. c  o m
 */
public WebSearchDialog(Dialog owner) {

    super(owner);
    setName("WebSearchDialog");
    ResourceMap resourceMap = Application.getInstance().getContext().getResourceMap(WebSearchDialog.class);
    resourceMap.injectFields(this);
    ActionMap actionMap = Application.getInstance().getContext().getActionMap(WebSearchDialog.class, this);

    setTitle(websearchTitle);
    setBounds(100, 100, 450, 250);
    getContentPane().setLayout(new BorderLayout());
    contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
    getContentPane().add(contentPanel, BorderLayout.CENTER);
    {
        lblSearchFor = new JLabel(searchForLabel);
    }

    txtSearch = new JTextField();
    txtSearch.setColumns(10);

    final JLabel lblUsing = new JLabel(usingLabel);

    cmbSearchEngine = new JComboBox();
    GroupLayout gl_contentPanel = new GroupLayout(contentPanel);
    gl_contentPanel.setHorizontalGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_contentPanel.createSequentialGroup().addContainerGap()
                    .addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)
                            .addComponent(lblSearchFor, GroupLayout.DEFAULT_SIZE, 404, Short.MAX_VALUE)
                            .addComponent(cmbSearchEngine, 0, 404, Short.MAX_VALUE)
                            .addComponent(txtSearch, GroupLayout.DEFAULT_SIZE, 404, Short.MAX_VALUE)
                            .addComponent(lblUsing, GroupLayout.DEFAULT_SIZE, 404, Short.MAX_VALUE))
                    .addContainerGap()));
    gl_contentPanel
            .setVerticalGroup(
                    gl_contentPanel.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_contentPanel.createSequentialGroup().addContainerGap()
                                    .addComponent(lblSearchFor).addPreferredGap(ComponentPlacement.UNRELATED)
                                    .addComponent(txtSearch, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addGap(27).addComponent(lblUsing)
                                    .addPreferredGap(ComponentPlacement.UNRELATED)
                                    .addComponent(cmbSearchEngine, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap(41, Short.MAX_VALUE)));
    contentPanel.setLayout(gl_contentPanel);
    {
        JPanel buttonPane = new JPanel();
        buttonPane.setLayout(new FlowLayout(FlowLayout.CENTER));
        getContentPane().add(buttonPane, BorderLayout.SOUTH);
        {
            JButton okButton = new JButton("[OK]");
            okButton.setAction(actionMap.get("WebSearchDialog_search"));
            buttonPane.add(okButton);
            getRootPane().setDefaultButton(okButton);
        }
        {
            JButton cancelButton = new JButton("[Cancel]");
            cancelButton.setAction(actionMap.get("WebSearchDialog_cancel"));
            buttonPane.add(cancelButton);
        }
    }

    LocalConfigFiles files = new LocalConfigFiles("intkey");
    File f = files.getWebsearchIndexFile();
    if (f.exists()) {
        loadSearchEngines(f, cmbSearchEngine);
    }

    cmbSearchEngine.requestFocus();
}

From source file:components.TextAreaDemo.java

private void initComponents() {
    jLabel1 = new JLabel("Try typing 'spectacular' or 'Swing'...");

    textArea = new JTextArea();
    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    textArea.setColumns(20);//ww  w .  ja v  a 2 s . c  om
    textArea.setLineWrap(true);
    textArea.setRows(5);
    textArea.setWrapStyleWord(true);

    jScrollPane1 = new JScrollPane(textArea);

    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 scroll panel and a label to the parallel group h2
    h2.addComponent(jScrollPane1, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 212,
            Short.MAX_VALUE);
    h2.addComponent(jLabel1, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE);

    //Add a container gap to the sequential group h1
    h1.addContainerGap();
    // Add the group h2 to the group h1
    h1.addGroup(h2);
    h1.addContainerGap();
    //Add the group h1 to hGroup
    hGroup.addGroup(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
    SequentialGroup v1 = layout.createSequentialGroup();
    //Add a container gap to the sequential group v1
    v1.addContainerGap();
    //Add a label to the sequential group v1
    v1.addComponent(jLabel1);
    v1.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED);
    //Add scroll panel to the sequential group v1
    v1.addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE);
    v1.addContainerGap();
    //Add the group v1 to vGroup
    vGroup.addGroup(v1);
    //Create the vertical group
    layout.setVerticalGroup(vGroup);
    pack();

}

From source file:JQGraphicModule.QueryTableApp.java

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

    lineas = new javax.swing.JPanel();
    l = new javax.swing.JRadioButton();
    b = new javax.swing.JRadioButton();
    p = new javax.swing.JRadioButton();
    jButton1 = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    javax.swing.GroupLayout lineasLayout = new javax.swing.GroupLayout(lineas);
    lineas.setLayout(lineasLayout);
    lineasLayout.setHorizontalGroup(lineasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 397, Short.MAX_VALUE));
    lineasLayout.setVerticalGroup(lineasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 263, Short.MAX_VALUE));

    l.setText("Linear");
    l.setToolTipText("");
    l.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            lActionPerformed(evt);
        }
    });

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

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

    jButton1.setText("Graphicate");
    jButton1.setToolTipText("");
    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(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(l).addComponent(b).addComponent(p).addComponent(jButton1))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 73, Short.MAX_VALUE)
                    .addComponent(lineas, 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().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(lineas, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(61, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup().addComponent(l)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(b)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(p)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton1).addGap(86, 86, 86)))));

    pack();
}

From source file:pl.piotrsukiennik.jbrain.gui.NewSimulationPanel.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   www. j av a2  s. co m
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    titleInput = new javax.swing.JTextField();
    timeInput = new javax.swing.JSlider();
    routeInput = new javax.swing.JComboBox();
    imageHolder = new javax.swing.JPanel();
    jLabel5 = new javax.swing.JLabel();
    simulateButton = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();

    setBackground(new java.awt.Color(255, 255, 255));

    titleInput.setText("Simulation");
    titleInput.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            titleInputActionPerformed(evt);
        }
    });

    timeInput.setBackground(new java.awt.Color(255, 255, 255));
    timeInput.setMaximum(10000);
    timeInput.setMinimum(100);
    timeInput.setValue(1000);
    timeInput.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            timeInputStateChanged(evt);
        }
    });

    routeInput.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            routeInputActionPerformed(evt);
        }
    });

    imageHolder.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
    imageHolder.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            imageHolderMouseClicked(evt);
        }
    });

    jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel5.setText("No input image selected");

    javax.swing.GroupLayout imageHolderLayout = new javax.swing.GroupLayout(imageHolder);
    imageHolder.setLayout(imageHolderLayout);
    imageHolderLayout.setHorizontalGroup(
            imageHolderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
                    javax.swing.GroupLayout.Alignment.TRAILING,
                    imageHolderLayout.createSequentialGroup().addContainerGap()
                            .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 356, Short.MAX_VALUE)
                            .addContainerGap()));
    imageHolderLayout
            .setVerticalGroup(imageHolderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(imageHolderLayout.createSequentialGroup().addContainerGap()
                            .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)
                            .addContainerGap()));

    simulateButton.setText("Simulate!");
    simulateButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            simulateButtonActionPerformed(evt);
        }
    });

    jLabel1.setText("Simulation title:");

    jLabel2.setText("Simulation time (msec):");

    jLabel3.setText("Brain route:");

    jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel4.setText("Input image:");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(imageHolder, javax.swing.GroupLayout.Alignment.TRAILING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addComponent(simulateButton, javax.swing.GroupLayout.Alignment.TRAILING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout
                            .createSequentialGroup()
                            .addGroup(layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(
                                            jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE)
                                    .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 177,
                                            Short.MAX_VALUE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(titleInput, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(routeInput, javax.swing.GroupLayout.Alignment.TRAILING, 0,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(timeInput, javax.swing.GroupLayout.Alignment.TRAILING,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)))
                    .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE))
                    .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, false)
                    .addComponent(titleInput, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup().addGap(3, 3, 3).addComponent(jLabel1,
                            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(timeInput, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2, 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.BASELINE)
                            .addComponent(routeInput, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(imageHolder, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(simulateButton).addContainerGap()));
}

From source file:lockers.FrameCobro.java

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

    jLabel1 = new javax.swing.JLabel();
    jLblAvailableLockers = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jPanel1 = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Selecciona tu locker");
    setPreferredSize(new java.awt.Dimension(640, 480));

    jLabel1.setText("Disponibilidad de Lockers");

    jLblAvailableLockers.setText("Sin disponibilidad");

    jLabel2.setText("Tarifas Vigentes");

    jPanel1.setLayout(new java.awt.GridLayout(0, 1));

    jPanel2.setLayout(new java.awt.GridLayout(4, 3));

    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)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLblAvailableLockers)
                                    .addGroup(layout.createSequentialGroup().addGap(31, 31, 31)
                                            .addComponent(jLabel2))
                                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 195,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(6, 6, 6)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(14, 14, 14).addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup().addComponent(jLabel1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLblAvailableLockers).addGap(10, 10, 10).addComponent(jLabel2)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)))
                    .addContainerGap()));

    jLblAvailableLockers.getAccessibleContext().setAccessibleName("jLblAvailableLockers");

    pack();
}

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

    filePathLabel = new JLabel();
    pathField = new JTextField();
    pathButton = new JButton();
    filenameLabel = new JLabel();
    filenameField = new JTextField();
    confirmButton = new JButton();
    filenameTip = new JLabel();

    FormListener formListener = new FormListener();

    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("");
    setResizable(false);

    filePathLabel.setFont(new Font("", 0, 12)); // NOI18N
    filePathLabel.setText("");

    pathField.setFont(new Font("", 0, 12)); // NOI18N

    pathButton.setFont(new Font("", 0, 12)); // NOI18N
    pathButton.setText("?");
    pathButton.addActionListener(formListener);

    filenameLabel.setFont(new Font("", 0, 12)); // NOI18N
    filenameLabel.setText("??");

    filenameField.setFont(new Font("", 0, 12)); // NOI18N

    confirmButton.setFont(new Font("", 0, 12)); // NOI18N
    confirmButton.setText("");
    confirmButton.addActionListener(formListener);

    filenameTip.setFont(new Font("", 0, 12)); // NOI18N
    filenameTip.setForeground(new Color(153, 153, 153));
    filenameTip.setText("???");

    GroupLayout layout = new GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
            .createSequentialGroup()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
                    .createSequentialGroup().addGap(19, 19, 19)
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(filePathLabel).addComponent(filenameLabel))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(filenameTip)
                            .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                                            .addComponent(pathField, GroupLayout.DEFAULT_SIZE, 213,
                                                    Short.MAX_VALUE)
                                            .addComponent(filenameField))
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(pathButton))))
                    .addGroup(layout.createSequentialGroup().addGap(167, 167, 167).addComponent(confirmButton)))
            .addContainerGap(33, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(filePathLabel)
                    .addComponent(pathField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(pathButton))
            .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(filenameLabel)
                    .addComponent(filenameField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(filenameTip)
            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
            .addComponent(confirmButton).addContainerGap()));

    pack();
}

From source file:com.cactus.ClientLoginGUI.java

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

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

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

    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

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

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

    Username_Label.setText("Username:");

    Password_label.setText("Password:");

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

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

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

    pack();
}