Example usage for com.jgoodies.forms.layout CellConstraints DEFAULT

List of usage examples for com.jgoodies.forms.layout CellConstraints DEFAULT

Introduction

In this page you can find the example usage for com.jgoodies.forms.layout CellConstraints DEFAULT.

Prototype

Alignment DEFAULT

To view the source code for com.jgoodies.forms.layout CellConstraints DEFAULT.

Click Source Link

Document

Use the column's or row's default alignment.

Usage

From source file:org.jdesktop.swingx.demo.CustomizeBuddyField.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY
    // //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Peter Weishapl
    panel2 = new JPanel();
    titledSeparator1 = new TitledSeparator();
    label2 = new JLabel();
    txtOuterMargin = new JFormattedTextField();
    panel3 = new JPanel();
    cbSnapBack = new JRadioButton();
    toggleButton1 = new JLabel();
    cbRss = new JRadioButton();
    label1 = new JLabel();
    cbCheckbox = new JRadioButton();
    checkBox2 = new JCheckBox();
    cbGap = new JRadioButton();
    panel1 = new JPanel();
    btnAddLeft = new JButton();
    btnAddRight = new JButton();
    btnRemoveall = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== panel2 ========
    {/*  w  w  w  .jav  a  2s  . co  m*/

        panel2.setLayout(new BorderLayout());

        //======== this ========
        {
            this.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                    new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC }));

            //---- titledSeparator1 ----
            titledSeparator1.setTitle("Buddies");
            this.add(titledSeparator1, cc.xywh(1, 1, 4, 1));

            //---- label2 ----
            label2.setText("Outer Margin:");
            this.add(label2, cc.xy(2, 3));

            //---- txtOuterMargin ----
            txtOuterMargin.addPropertyChangeListener("value", new PropertyChangeListener() {
                public void propertyChange(PropertyChangeEvent e) {
                    txtOuterMarginPropertyChange(e);
                }
            });
            this.add(txtOuterMargin, cc.xy(4, 3));

            //======== panel3 ========
            {
                panel3.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                new ColumnSpec(ColumnSpec.LEFT, Sizes.DLUX1, FormSpec.NO_GROW),
                                FormFactory.DEFAULT_COLSPEC, FormFactory.UNRELATED_GAP_COLSPEC,
                                FormFactory.DEFAULT_COLSPEC,
                                new ColumnSpec(ColumnSpec.LEFT, Sizes.DLUX1, FormSpec.NO_GROW),
                                FormFactory.DEFAULT_COLSPEC, FormFactory.UNRELATED_GAP_COLSPEC,
                                FormFactory.DEFAULT_COLSPEC,
                                new ColumnSpec(ColumnSpec.LEFT, Sizes.DLUX1, FormSpec.NO_GROW),
                                FormFactory.DEFAULT_COLSPEC, FormFactory.UNRELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC }));

                //---- cbSnapBack ----
                cbSnapBack.setSelected(true);
                panel3.add(cbSnapBack, cc.xy(1, 1));

                //---- toggleButton1 ----
                toggleButton1.setIcon(
                        new ImageIcon(getClass().getResource("/org/jdesktop/swingx/demo/Search_SnapBack.png")));
                panel3.add(toggleButton1, cc.xy(3, 1));
                panel3.add(cbRss, cc.xy(5, 1));

                //---- label1 ----
                label1.setIcon(
                        new ImageIcon(getClass().getResource("/org/jdesktop/swingx/demo/ShowRSSButton.png")));
                panel3.add(label1, cc.xy(7, 1));
                panel3.add(cbCheckbox, cc.xy(9, 1));
                panel3.add(checkBox2, cc.xy(11, 1));

                //---- cbGap ----
                cbGap.setText("Gap");
                panel3.add(cbGap, cc.xy(13, 1));

                //======== panel1 ========
                {
                    panel1.setLayout(new FormLayout(
                            new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC,
                                    new ColumnSpec(ColumnSpec.RIGHT, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                    new ColumnSpec(ColumnSpec.LEFT, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                            RowSpec.decodeSpecs("default")));

                    //---- btnAddLeft ----
                    btnAddLeft.setText("Add Left");
                    btnAddLeft.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            btnAddLeftActionPerformed(e);
                        }
                    });
                    panel1.add(btnAddLeft, cc.xy(2, 1));

                    //---- btnAddRight ----
                    btnAddRight.setText("Add Right");
                    btnAddRight.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            btnAddRightActionPerformed(e);
                        }
                    });
                    panel1.add(btnAddRight, cc.xy(4, 1));

                    //---- btnRemoveall ----
                    btnRemoveall.setText("Remove All");
                    btnRemoveall.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            btnRemoveallActionPerformed(e);
                        }
                    });
                    panel1.add(btnRemoveall,
                            cc.xywh(6, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
                }
                panel3.add(panel1, cc.xywh(1, 3, 13, 1));
            }
            this.add(panel3, cc.xywh(2, 5, 3, 1));
        }
        panel2.add(this, BorderLayout.CENTER);
    }

    //---- buttonGroup1 ----
    ButtonGroup buttonGroup1 = new ButtonGroup();
    buttonGroup1.add(cbSnapBack);
    buttonGroup1.add(cbRss);
    buttonGroup1.add(cbCheckbox);
    buttonGroup1.add(cbGap);
    // //GEN-END:initComponents
}

From source file:org.jdesktop.xswingx.demo.CustomizeBuddyField.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY
    // //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Peter Weishapl
    panel2 = new JPanel();
    titledSeparator1 = new TitledSeparator();
    label2 = new JLabel();
    txtOuterMargin = new JFormattedTextField();
    panel3 = new JPanel();
    cbSnapBack = new JRadioButton();
    toggleButton1 = new JLabel();
    cbRss = new JRadioButton();
    label1 = new JLabel();
    cbCheckbox = new JRadioButton();
    checkBox2 = new JCheckBox();
    cbGap = new JRadioButton();
    panel1 = new JPanel();
    btnAddLeft = new JButton();
    btnAddRight = new JButton();
    btnRemoveall = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== panel2 ========
    {//from  ww w.ja va 2 s. c o  m

        panel2.setLayout(new BorderLayout());

        //======== this ========
        {
            this.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                    new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC }));

            //---- titledSeparator1 ----
            titledSeparator1.setTitle("Buddies");
            this.add(titledSeparator1, cc.xywh(1, 1, 4, 1));

            //---- label2 ----
            label2.setText("Outer Margin:");
            this.add(label2, cc.xy(2, 3));

            //---- txtOuterMargin ----
            txtOuterMargin.addPropertyChangeListener("value", new PropertyChangeListener() {
                public void propertyChange(PropertyChangeEvent e) {
                    txtOuterMarginPropertyChange(e);
                }
            });
            this.add(txtOuterMargin, cc.xy(4, 3));

            //======== panel3 ========
            {
                panel3.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                new ColumnSpec(ColumnSpec.LEFT, Sizes.DLUX1, FormSpec.NO_GROW),
                                FormFactory.DEFAULT_COLSPEC, FormFactory.UNRELATED_GAP_COLSPEC,
                                FormFactory.DEFAULT_COLSPEC,
                                new ColumnSpec(ColumnSpec.LEFT, Sizes.DLUX1, FormSpec.NO_GROW),
                                FormFactory.DEFAULT_COLSPEC, FormFactory.UNRELATED_GAP_COLSPEC,
                                FormFactory.DEFAULT_COLSPEC,
                                new ColumnSpec(ColumnSpec.LEFT, Sizes.DLUX1, FormSpec.NO_GROW),
                                FormFactory.DEFAULT_COLSPEC, FormFactory.UNRELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC }));

                //---- cbSnapBack ----
                cbSnapBack.setSelected(true);
                panel3.add(cbSnapBack, cc.xy(1, 1));

                //---- toggleButton1 ----
                toggleButton1.setIcon(new ImageIcon(
                        getClass().getResource("/org/jdesktop/xswingx/demo/Search_SnapBack.png")));
                panel3.add(toggleButton1, cc.xy(3, 1));
                panel3.add(cbRss, cc.xy(5, 1));

                //---- label1 ----
                label1.setIcon(
                        new ImageIcon(getClass().getResource("/org/jdesktop/xswingx/demo/ShowRSSButton.png")));
                panel3.add(label1, cc.xy(7, 1));
                panel3.add(cbCheckbox, cc.xy(9, 1));
                panel3.add(checkBox2, cc.xy(11, 1));

                //---- cbGap ----
                cbGap.setText("Gap");
                panel3.add(cbGap, cc.xy(13, 1));

                //======== panel1 ========
                {
                    panel1.setLayout(new FormLayout(
                            new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC,
                                    new ColumnSpec(ColumnSpec.RIGHT, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                    new ColumnSpec(ColumnSpec.LEFT, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                            RowSpec.decodeSpecs("default")));

                    //---- btnAddLeft ----
                    btnAddLeft.setText("Add Left");
                    btnAddLeft.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            btnAddLeftActionPerformed(e);
                        }
                    });
                    panel1.add(btnAddLeft, cc.xy(2, 1));

                    //---- btnAddRight ----
                    btnAddRight.setText("Add Right");
                    btnAddRight.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            btnAddRightActionPerformed(e);
                        }
                    });
                    panel1.add(btnAddRight, cc.xy(4, 1));

                    //---- btnRemoveall ----
                    btnRemoveall.setText("Remove All");
                    btnRemoveall.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            btnRemoveallActionPerformed(e);
                        }
                    });
                    panel1.add(btnRemoveall,
                            cc.xywh(6, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
                }
                panel3.add(panel1, cc.xywh(1, 3, 13, 1));
            }
            this.add(panel3, cc.xywh(2, 5, 3, 1));
        }
        panel2.add(this, BorderLayout.CENTER);
    }

    //---- buttonGroup1 ----
    ButtonGroup buttonGroup1 = new ButtonGroup();
    buttonGroup1.add(cbSnapBack);
    buttonGroup1.add(cbRss);
    buttonGroup1.add(cbCheckbox);
    buttonGroup1.add(cbGap);
    // //GEN-END:initComponents
}

From source file:org.openconcerto.ui.FormLayouter.java

License:Open Source License

public FormLayouter(Container co, int width, int defaultWidth) {
    if (width < 1)
        throw new IllegalArgumentException("width must be at least 1 : " + width);

    this.x = 0;/*from   w w  w .j  a  v  a 2s .  co  m*/
    this.y = 0;
    this.constraints = new CellConstraints();
    // i.e. from ROW_HEIGHT
    this.rowAlign = CellConstraints.DEFAULT;

    this.co = co;
    this.width = width;
    this.defaultWidth = defaultWidth;
    final String colSpec = BORDER_GAP + ", "
            + CollectionUtils.join(Collections.nCopies(width, "max(25dlu;p), 5dlu, d:g"), ", 5dlu, ") + ", "
            + BORDER_GAP;
    final String rowSpec = BORDER_GAP + ", " + ROW_HEIGHT + ", " + BORDER_GAP;
    // tous les fields ont une taille gale
    final int[] colGroups = new int[width];
    for (int i = 0; i < width; i++) {
        colGroups[i] = CELL_WIDTH * (i + 1);
    }

    this.layout = new FormLayout(colSpec, rowSpec);
    this.layout.setColumnGroups(new int[][] { colGroups });
    co.setLayout(this.layout);
}

From source file:org.openconcerto.ui.FormLayouter.java

License:Open Source License

/**
 * Ajout un composant sur une ligne Si comp est null, un titre est cr.
 * //from  ww  w.j a  v a2s.co  m
 * @param desc le label du champ.
 * @param comp le composant graphique d'edition.
 * @param w la largeur, entre 1 et la largeur de ce layout, ou 0 pour toute la largeur.
 * @return the created label.
 * @throws NullPointerException if comp is <code>null</code>.
 * @throws IllegalArgumentException if w is less than 1.
 */
public JLabel add(String desc, Component comp, int w) {
    w = this.checkArgs(comp, w);

    final int realWidth = this.getRealFieldWidth(w);
    // Guillaume : right alignment like the Mac
    final JLabel lab = new JLabel(desc);
    this.co.add(lab,
            this.constraints.xy(this.getLabelX(), this.getY(), CellConstraints.RIGHT, this.getRowAlign()));
    this.co.add(comp, this.constraints.xyw(this.getFieldX(), this.getY(), realWidth, CellConstraints.DEFAULT,
            this.getRowAlign()));
    this.x += w;
    return lab;
}

From source file:org.openconcerto.ui.FormLayouter.java

License:Open Source License

public JPanel addBordered(String desc, Component comp, int w) {
    w = this.checkArgs(comp, w);

    final int realWidth = w * CELL_WIDTH - 1;
    JPanel p = new JPanel();
    p.setOpaque(false);// w  w w .  j  a  v a  2 s  .  com
    p.setLayout(new GridLayout());
    p.setBorder(BorderFactory.createTitledBorder(desc));
    p.add(comp);

    this.co.add(p, this.constraints.xyw(this.getLabelX(), this.getY(), realWidth, CellConstraints.DEFAULT,
            this.getRowAlign()));
    this.x += w;
    return p;
}

From source file:org.pmedv.blackboard.panels.BoardPropertiesPanel.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    label3 = new JLabel();
    typeCombo = new JComboBox(BoardType.values());
    label4 = new JLabel();
    fileField = new FileBrowserTextfield();
    label1 = new JLabel();
    boardWidthSpinner = new JSpinner();
    label5 = new JLabel();
    label2 = new JLabel();
    boardHeightSpinner = new JSpinner();
    unitComboBox = new JComboBox();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setLayout(new FormLayout("2*($lcgap), default, 3*($lcgap, default:grow), 2*($lcgap)",
            "2*($lgap), 4*(default, $lgap), $lgap"));

    //---- label3 ----
    label3.setText(resources.getResourceByKey("BoardPropertiesPanel.boardType"));
    add(label3, cc.xy(3, 3));//w w w  . j  ava2 s .c  o  m
    add(typeCombo, cc.xywh(5, 3, 5, 1));

    //---- label4 ----
    label4.setText(resources.getResourceByKey("BoardPropertiesPanel.background"));
    add(label4, cc.xy(3, 5));
    add(fileField, cc.xywh(5, 5, 5, 1));

    //---- label1 ----
    label1.setText(resources.getResourceByKey("BoardPropertiesPanel.board.width"));
    add(label1, cc.xy(3, 7));
    add(boardWidthSpinner, cc.xy(5, 7));

    //---- label5 ----
    label5.setText(resources.getResourceByKey("BoardPropertiesPanel.unit"));
    add(label5, cc.xy(7, 7, CellConstraints.LEFT, CellConstraints.DEFAULT));

    //---- label2 ----
    label2.setText(resources.getResourceByKey("BoardPropertiesPanel.board.height"));
    add(label2, cc.xy(3, 9));
    add(boardHeightSpinner, cc.xy(5, 9));
    add(unitComboBox, cc.xy(7, 9, CellConstraints.LEFT, CellConstraints.DEFAULT));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.pmedv.blackboard.panels.PartPanel.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    mainSplitpane = new JSplitPane();
    panel1 = new JPanel();
    filterPanel = new FilterPanel();
    scrollPane1 = new JScrollPane();
    partTable = new AlternatingLineTable();
    imageDescriptionSplitPane = new JSplitPane();
    imagePanel = new JPanel();
    imageLabel = new JLabel();
    bottomPanel = new JPanel();
    label1 = new JLabel();
    partNameField = new JTextField();
    label2 = new JLabel();
    packageTypeField = new JTextField();
    label4 = new JLabel();
    authorField = new JTextField();
    label5 = new JLabel();
    licenseField = new JTextField();
    label3 = new JLabel();
    scrollPane2 = new JScrollPane();
    descriptionPane = new JEditorPane();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setLayout(new FormLayout("2*($lcgap), default:grow, 2*($lcgap)", "2*($lgap), default:grow, 2*($lgap)"));

    //======== mainSplitpane ========
    {//from  www  .  j  a va  2s  . co m

        //======== panel1 ========
        {
            panel1.setLayout(new FormLayout("default:grow", "default, $lgap, fill:default:grow"));
            panel1.add(filterPanel, cc.xy(1, 1));

            //======== scrollPane1 ========
            {
                scrollPane1.setViewportView(partTable);
            }
            panel1.add(scrollPane1, cc.xy(1, 3));
        }
        mainSplitpane.setLeftComponent(panel1);

        //======== imageDescriptionSplitPane ========
        {
            imageDescriptionSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);

            //======== imagePanel ========
            {
                imagePanel.setBorder(LineBorder.createBlackLineBorder());
                imagePanel.setLayout(new FormLayout("default, $lcgap, default:grow, $lcgap, default",
                        "default, $lgap, default:grow, $lgap, default"));

                //---- imageLabel ----
                imageLabel.setText("text");
                imagePanel.add(imageLabel, cc.xy(3, 3, CellConstraints.CENTER, CellConstraints.FILL));
            }
            imageDescriptionSplitPane.setTopComponent(imagePanel);

            //======== bottomPanel ========
            {
                bottomPanel.setLayout(new FormLayout("2*($lcgap), default, $lcgap, default:grow, 2*($lcgap)",
                        "2*($lgap), 5*(default, $lgap), fill:default:grow, 2*($lgap)"));

                //---- label1 ----
                label1.setText(resources.getResourceByKey("PartPanel.partname"));
                bottomPanel.add(label1, cc.xy(3, 3));

                //---- partNameField ----
                partNameField.setEditable(false);
                bottomPanel.add(partNameField, cc.xy(5, 3));

                //---- label2 ----
                label2.setText(resources.getResourceByKey("PartPanel.packagetype"));
                bottomPanel.add(label2, cc.xy(3, 5));

                //---- packageTypeField ----
                packageTypeField.setEditable(false);
                bottomPanel.add(packageTypeField, cc.xy(5, 5));

                //---- label4 ----
                label4.setText(resources.getResourceByKey("PartPanel.author"));
                bottomPanel.add(label4, cc.xy(3, 7));

                //---- authorField ----
                authorField.setEditable(false);
                bottomPanel.add(authorField, cc.xy(5, 7));

                //---- label5 ----
                label5.setText(resources.getResourceByKey("PartPanel.license"));
                bottomPanel.add(label5, cc.xy(3, 9));

                //---- licenseField ----
                licenseField.setEditable(false);
                bottomPanel.add(licenseField, cc.xy(5, 9));

                //---- label3 ----
                label3.setText(resources.getResourceByKey("PartPanel.description"));
                bottomPanel.add(label3, cc.xy(3, 11));

                //======== scrollPane2 ========
                {

                    //---- descriptionPane ----
                    descriptionPane.setEditable(false);
                    scrollPane2.setViewportView(descriptionPane);
                }
                bottomPanel.add(scrollPane2, cc.xywh(3, 13, 3, 1));
            }
            imageDescriptionSplitPane.setBottomComponent(bottomPanel);
        }
        mainSplitpane.setRightComponent(imageDescriptionSplitPane);
    }
    add(mainSplitpane, cc.xy(3, 3, CellConstraints.DEFAULT, CellConstraints.FILL));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.pmedv.blackboard.panels.ResistorPanel.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    label1 = new JLabel();
    nameField = new JTextField();
    label3 = new JLabel();
    toleranceCombo = new JComboBox();
    label2 = new JLabel();
    valueSpinner = new JSpinner();
    multiplierCombo = new JComboBox();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setLayout(new FormLayout("2*($lcgap), default, 3*($lcgap, default:grow), $lcgap, default, 2*($lcgap)",
            "2*($lgap), 2*(default, $lgap), $lgap"));

    //---- label1 ----
    label1.setText(resources.getResourceByKey("ResistorPanel.name"));
    add(label1, cc.xy(3, 3));//  ww  w .j ava  2 s. c  o  m
    add(nameField, cc.xywh(5, 3, 3, 1));

    //---- label3 ----
    label3.setText(resources.getResourceByKey("ResistorPanel.tolerance"));
    add(label3, cc.xy(9, 3, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    add(toleranceCombo, cc.xy(11, 3));

    //---- label2 ----
    label2.setText(resources.getResourceByKey("ResistorPanel.value"));
    add(label2, cc.xy(3, 5));
    add(valueSpinner, cc.xywh(5, 5, 5, 1));
    add(multiplierCombo, cc.xy(11, 5));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.pmedv.core.gui.panels.LoginPanel.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    usernameLabel = new JLabel();
    userNameField = new JTextField();
    label1 = new JLabel();
    passwordField = new JPasswordField();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setLayout(new FormLayout(
            "$ugap, $lcgap, default, $lcgap, 66dlu, $lcgap, default:grow, $lcgap, default, $lcgap, $ugap",
            "fill:default:grow, 2*($lgap, default), $lgap, fill:default:grow"));

    //---- usernameLabel ----
    usernameLabel.setText("Username :");
    add(usernameLabel, cc.xy(5, 3));// w w  w  .j a v a2  s .  c om
    add(userNameField, cc.xywh(7, 3, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));

    //---- label1 ----
    label1.setText("Password :");
    add(label1, cc.xy(5, 5));
    add(passwordField, cc.xywh(7, 5, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:presentation.GuiLogWindow.java

License:Open Source License

/**
 * This method initializes jPanelOutput/*ww w. j  a v a2  s  .com*/
 * 
 * @return javax.swing.JPanel
 */
private JPanel getJPanelOutput() {
    if (jPanelOutput == null) {
        jPanelOutput = new JPanel();
        FormLayout layout = new FormLayout("f:d:grow", //columna
                "f:d:grow, pref"); //rows
        PanelBuilder builder = new PanelBuilder(jPanelOutput, layout);
        CellConstraints cc = new CellConstraints();

        builder.add(this.getJScrollPaneLogArea(), cc.xy(1, 1));
        builder.add(this.getJButtonClearLogArea(), cc.xy(1, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    }
    return jPanelOutput;
}