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

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

Introduction

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

Prototype

public CellConstraints xy(int col, int row) 

Source Link

Document

Sets column and row origins; sets width and height to 1; uses the default alignments.

Examples:

 cc.xy(1, 1); cc.xy(1, 3); 

Usage

From source file:com.starillon.ibtradetools.ui.spreadcalc.SpreadStrategyTab.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Mark French
    panel1 = new JPanel();
    expiryLbl = new JLabel();
    strikeGapLbl = new JLabel();
    strategyScrollPnl = new JScrollPane();
    strategyTbl = new JTable();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setMinimumSize(new Dimension(780, 780));

    // JFormDesigner evaluation mark
    setBorder(//w  ww . ja  va2s  . c  o m
            new javax.swing.border.CompoundBorder(
                    new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                            "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                            javax.swing.border.TitledBorder.BOTTOM,
                            new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red),
                    getBorder()));
    addPropertyChangeListener(new java.beans.PropertyChangeListener() {
        public void propertyChange(java.beans.PropertyChangeEvent e) {
            if ("border".equals(e.getPropertyName()))
                throw new RuntimeException();
        }
    });

    setLayout(new FormLayout("379dlu", "default, 212dlu"));

    //======== panel1 ========
    {
        panel1.setLayout(new FormLayout("center:190dlu, $lcgap, center:184dlu", "default, $lgap"));
        panel1.add(expiryLbl, cc.xy(1, 1));
        panel1.add(strikeGapLbl, cc.xy(3, 1));
    }
    add(panel1, cc.xy(1, 1));

    //======== strategyScrollPnl ========
    {

        //---- strategyTbl ----
        strategyTbl.setModel(new DefaultTableModel(1, 0));
        initModels();
        strategyScrollPnl.setViewportView(strategyTbl);
    }
    add(strategyScrollPnl, cc.xy(1, 2));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:com.tcay.slalom.UI.client.ClientRacePenaltiesUIDynamic.java

License:Open Source License

private int setupPenaltyButtons() {

    CellConstraints cc = new CellConstraints();
    int row = 1;//from  w w  w.  j a  va2 s. c  om
    int col = -1;
    int section = 0;
    int iGate = 0;
    ImageIcon icon;
    int maxRow = 0;
    GatePenaltyButton gateButton;

    //     int nbrGates = raceProxy.getNbrGates();

    for (int i = 0; i < nbrGates /*getNbrOfSections()*/; i++) {
        iGate++;

        if (raceProxy.isFirstGateInSection(iGate, section)) {
            section++;

            row = 1;

            if (onlyThisSection == 0) {// || onlyThisSection ==section  ) {
                col += 2;
                // Add Section Title
                //log.trace("New Section #" + section + " at Gate #" + iGate);
                // Need a INTELLIJ JAR todo eliminating jars   Spacer spacer1 = new Spacer();
                //innerPanel.add(spacer1, cc.xy(col,( ROW_OFFSET+ (row * 2)), CellConstraints.DEFAULT, CellConstraints.FILL));
                innerPanel.add(new JLabel("Section " + section), cc.xy(col, +(ROW_OFFSET + (row * 2))));
                row++;
                if (row > maxRow) {
                    maxRow = row;
                }

            } else {
                col = 3;//1;
            }
        }

        if (col < 1)
            col = 3;

        //log.trace("gate " + iGate + " section " + section  );

        //
        //            boolean rc = raceProxy.isGateInSection(iGate, onlyThisSection);
        //            System.out.println("OLD Gate " + iGate + " is " + (rc==true?"":"NOT ") + "IN SECTION");
        boolean rc;
        if (isGateInOurSection(iGate)) {
            rc = true;
        } else {
            rc = false;
        }
        //            System.out.println("NEW Gate " + iGate + " is " + (rc==true?"":"NOT ") + "IN SECTION");

        if ((onlyThisSection != 0) && !rc) {
            //                log.trace("CONTINUE");
            //                System.out.println("Skipping Gate" + iGate);
            continue;
        }

        if (raceProxy.isUpstream(iGate)) {
            icon = resources.getUpstreamSmallII();
        } else {
            icon = resources.getDownstreamSmallII();
        }

        gateButton = new GatePenaltyButton(iGate, (new Integer(iGate)).toString(), icon);
        penaltyButtons.add(gateButton);

        innerPanel.add(gateButton, cc.xy(col, (ROW_OFFSET + (row * 2)))); // todo move to single load time instantiation
        row++;
        if (row > maxRow) {
            maxRow = row;
        }
        gateButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent actionEvent) {
                GatePenaltyButton btn = (GatePenaltyButton) actionEvent.getSource();
                String reasonCode = null;
                Integer penalty = 0;
                if (btn.getPenalty() == 0) {
                    penalty = 2;
                } else {
                    penalty = btn.getPenalty();
                    if (penalty == 2) {
                        penalty = 50;
                        if (Race.getInstance().isIcfPenalties()) {
                            ClientRacePenaltyICF50SecondReasonDialog reasonDialog = new ClientRacePenaltyICF50SecondReasonDialog();
                            reasonCode = reasonDialog.doDialog(btn, selectedRun.getBoat().toString(),
                                    btn.getGate());
                        }

                    } else if (penalty == 50) {
                        penalty = 0;
                    }
                }
                btn.setPenalty(penalty, reasonCode);
                // update the Button
            }
        });
    }
    return (maxRow);
}

From source file:com.tcay.slalom.UI.client.ClientRacePenaltiesUIDynamic.java

License:Open Source License

private void setupInnerPanelUI() {

    penaltyButtons = new ArrayList<GatePenaltyButton>();

    innerPanel = new JPanel();

    activeOrRecentRunsComboBox = new JComboBox();

    activeOrRecentRunsComboBox.setRenderer(new HighLightRowRenderer(activeOrRecentRunsComboBox.getRenderer()));
    activeOrRecentRunsComboBox.setToolTipText(
            "Entries with light green background have not been scored, light red backgrounds have been scored");

    doneBtn = new JButton();
    cancelBtn = new JButton();
    autoScroll = new JCheckBox();
    raceRunLabel = new JLabel();
    bibLabel = new BibLabel();

    StringBuffer columnSpec = new StringBuffer();
    StringBuffer rowSpec = new StringBuffer();
    int i;/*from   w  w  w .  ja  v a  2 s  . c om*/

    int maxCol = 5;
    if (onlyThisSection > 0) {
        maxCol = 3;
        for (i = 0; i < maxCol; i++) {
            if (i > 0)
                columnSpec.append(",");

            if (i % 2 == 0) {
                columnSpec.append("fill:50px:grow," + "left:6dlu:noGrow");
            } else {
                columnSpec.append("fill:120px:grow," + "left:6dlu:noGrow");
            }
        }
    } else {
        for (i = 0; i < maxCol; i++) {
            if (i > 0)
                columnSpec.append(",");

            columnSpec.append("fill:150px:grow," + "left:6dlu:noGrow");
        }
    }

    for (i = 0; i < 25 + 5; i++) { // figure on 25 rows maximum + 5
        if (i > 0)
            rowSpec.append(",");

        rowSpec.append("center:d:noGrow,top:3dlu:noGrow");
    }
    innerPanel.setLayout(new FormLayout(columnSpec.toString(), rowSpec.toString()));
    String title = new String(
            onlyThisSection == 0 ? "Penalty Scoring" : "Section " + onlyThisSection + " Penalty Scoring");

    innerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLoweredBevelBorder(), title));

    CellConstraints cc = new CellConstraints();
    innerPanel.add(activeOrRecentRunsComboBox, cc.xyw(1, 1, 5));

    selectRaceRun = new JButton();
    selectRaceRun.setText("Select Boat");
    selectRaceRun.setBackground(SlalomApp.LIGHT_GREEN);
    selectRaceRun.setOpaque(true);
    innerPanel.add(selectRaceRun, cc.xy(3, 3)); //1,3

    innerPanel.add(new JLabel("Bib#"), cc.xy(1, 3));
    innerPanel.add(bibLabel, cc.xy(1, 5 + 2)); //+2 A20160730

    innerPanel.add(raceRunLabel, cc.xyw(3, 5 + 2, 3)); //+2 A20160730

    // todo fix kludge ordering here in calls
    int maxRow = setupPenaltyButtons(); // max Row set here

    //        innerPanel.add(penaltyDescriptionLabel,      cc.xyw(1, (5 + maxRow * 2), 5));
    //        innerPanel.add(penaltyDiagramLabel,          cc.xyw(1, (7 + maxRow * 2), 5));

    doneBtn.setText("Done");
    doneBtn.setBackground(SlalomApp.LIGHT_GREEN);
    doneBtn.setOpaque(true);

    cancelBtn.setText("Cancel");
    cancelBtn.setBackground(SlalomApp.LIGHT_RED);
    cancelBtn.setOpaque(true);

    //        innerPanel.add(doneBtn, cc.xy(1, (maxRow*2) + 5));
    ///    innerPanel.add(doneBtn, cc.xy(3, 3));//(maxRow*2) + 5));  //1,3
    //    innerPanel.add(cancelBtn, cc.xy(5, 3));//(maxRow*2) + 5));  //1,3

    innerPanel.add(doneBtn, cc.xy(3, 3));//(maxRow*2) + 5));  //1,3
    innerPanel.add(cancelBtn, cc.xy(3, 5));//(maxRow*2) + 5));  //1,3

    autoScroll.setText("Auto Scroll");
    autoScroll.setToolTipText(
            "When selected automatically advance to next run needing scoring after 'Done' or 'Cancel' Buttons");
    autoScroll.setSelected(false);
    innerPanel.add(autoScroll, cc.xy(3, ROW_OFFSET + (maxRow * 2) + 2)); /// 20170413 (ajm)

}

From source file:com.tcay.slalom.UI.client.ICFPenaltyAssessmentMAYBE.java

License:Open Source License

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL//from  w  w  w .  j a va2 s  .  com
 */
private void $$$setupUI$$$() {
    panel1 = new JPanel();
    panel1.setLayout(new CardLayout(0, 0));
    final JPanel panel2 = new JPanel();
    panel2.setLayout(new FormLayout("fill:d:grow",
            "center:d:grow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:d:grow"));
    panel1.add(panel2, "Card1");
    final JPanel panel3 = new JPanel();
    panel3.setLayout(new FormLayout("fill:d:grow", "center:d:grow,top:3dlu:noGrow,center:max(d;4px):noGrow"));
    CellConstraints cc = new CellConstraints();
    panel2.add(panel3, cc.xy(1, 15));
    final JLabel label1 = new JLabel();
    label1.setIcon(new ImageIcon(getClass().getResource("/com/tcay/slalom/images/ICFPenaltyDiagram.png")));
    label1.setText("Label");
    panel3.add(label1, cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.DEFAULT));
    final JPanel panel4 = new JPanel();
    panel4.setLayout(new FormLayout("fill:d:grow", "center:d:grow,top:3dlu:noGrow,center:max(d;4px):noGrow"));
    panel2.add(panel4, cc.xy(1, 1));
    aMissedGateInRadioButton = new JRadioButton();
    aMissedGateInRadioButton.setText("(A) Missed gate in sequential order");
    panel4.add(aMissedGateInRadioButton, cc.xy(1, 3));
    bHeadPartOfRadioButton = new JRadioButton();
    bHeadPartOfRadioButton.setIcon(new ImageIcon(
            getClass().getResource("/com/tcay/slalom/images/ICFPenaltyHeadAndBoatNotInGateTogether.png")));
    bHeadPartOfRadioButton.setSelected(false);
    bHeadPartOfRadioButton.setText("(B) Head  part of boat NOT in the gate together");
    bHeadPartOfRadioButton.setMnemonic(' ');
    bHeadPartOfRadioButton.setDisplayedMnemonicIndex(9);
    panel2.add(bHeadPartOfRadioButton, cc.xy(1, 3));
    cPassedThroughTheRadioButton = new JRadioButton();
    cPassedThroughTheRadioButton.setIcon(
            new ImageIcon(getClass().getResource("/com/tcay/slalom/images/ICFPenaltyWrongDirection.png")));
    cPassedThroughTheRadioButton.setText("(C) Passed through the gate in wrong direction");
    panel2.add(cPassedThroughTheRadioButton, cc.xy(1, 5));
    dWashedBackThroughRadioButton = new JRadioButton();
    dWashedBackThroughRadioButton.setIcon(new ImageIcon(
            getClass().getResource("/com/tcay/slalom/images/ICFPenaltyWashedBackThroughGateLine.png")));
    dWashedBackThroughRadioButton.setText("(D) Washed back through gate line");
    panel2.add(dWashedBackThroughRadioButton, cc.xy(1, 7));
    ePaddlersDidnTRadioButton = new JRadioButton();
    ePaddlersDidnTRadioButton.setIcon(new ImageIcon(
            getClass().getResource("/com/tcay/slalom/images/ICFPenaltyDidntGoThroughas1Unit.png")));
    ePaddlersDidnTRadioButton.setText("(E) Paddlers didn't go through as one unit");
    panel2.add(ePaddlersDidnTRadioButton, cc.xy(1, 9));
    fIntentionallyMovedGateRadioButton = new JRadioButton();
    fIntentionallyMovedGateRadioButton.setIcon(new ImageIcon(
            getClass().getResource("/com/tcay/slalom/images/ICFPenaltyIntentionallyMovedGate.png")));
    fIntentionallyMovedGateRadioButton.setText("(F) Intentionally moved gate");
    panel2.add(fIntentionallyMovedGateRadioButton, cc.xy(1, 11));
    gUpsideDownInRadioButton = new JRadioButton();
    gUpsideDownInRadioButton
            .setIcon(new ImageIcon(getClass().getResource("/com/tcay/slalom/images/ICFPenaltyUpsideDown.png")));
    gUpsideDownInRadioButton.setText("(G) Upside down in gate");
    panel2.add(gUpsideDownInRadioButton, cc.xy(1, 13));
}

From source file:com.tcay.slalom.UI.client.SectionJudgeClientSectionSelector.java

License:Open Source License

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL//from   w  ww .  j  ava 2 s  .  com
 */
private void $$$setupUI$$$() {
    createUIComponents();
    panel1 = new JPanel();
    panel1.setLayout(new FormLayout("fill:122px:noGrow,left:39dlu:noGrow,fill:257px:grow",
            "center:d:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow"));
    CellConstraints cc = new CellConstraints();
    panel1.add(comboBoxJudgingSection, cc.xy(3, 1));
    final JLabel label1 = new JLabel();
    label1.setText("Section");
    panel1.add(label1, cc.xy(1, 1));
    doneButton = new JButton();
    doneButton.setText("Done");
    panel1.add(doneButton, cc.xy(3, 3));
}

From source file:com.tcay.slalom.UI.RaceConfigUI.java

License:Open Source License

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL/*from  w w  w  .  ja  va  2  s .  co m*/
 */
private void $$$setupUI$$$() {
    createUIComponents();
    panel1 = new JPanel();
    panel1.setLayout(new FormLayout(
            "fill:127px:noGrow,left:max(m;10px):noGrow,left:max(m;200px):grow,fill:max(d;4px):noGrow,fill:max(d;4px):noGrow",
            "center:d:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:d:grow,top:3dlu:noGrow,center:max(d;4px):noGrow"));
    final JLabel label1 = new JLabel();
    this.$$$loadLabelText$$$(label1,
            ResourceBundle.getBundle("resources/SlalomAppMessages").getString("race.name"));
    CellConstraints cc = new CellConstraints();
    panel1.add(label1, cc.xy(1, 1));
    raceName = new JTextField();
    panel1.add(raceName, cc.xyw(3, 1, 3, CellConstraints.FILL, CellConstraints.DEFAULT));
    final JLabel label2 = new JLabel();
    this.$$$loadLabelText$$$(label2,
            ResourceBundle.getBundle("resources/SlalomAppMessages").getString("race.date"));
    panel1.add(label2, cc.xy(1, 3));
    final JLabel label3 = new JLabel();
    this.$$$loadLabelText$$$(label3,
            ResourceBundle.getBundle("resources/SlalomAppMessages").getString("race.location"));
    panel1.add(label3, cc.xy(1, 5));
    raceVenue = new JTextField();
    raceVenue.setMinimumSize(new Dimension(60, 28));
    raceVenue.setPreferredSize(new Dimension(60, 28));
    panel1.add(raceVenue, cc.xyw(3, 5, 3, CellConstraints.FILL, CellConstraints.DEFAULT));
    panelLower = new JPanel();
    panelLower.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
    panel1.add(panelLower, cc.xyw(1, 9, 5));
    final JLabel label4 = new JLabel();
    this.$$$loadLabelText$$$(label4,
            ResourceBundle.getBundle("resources/SlalomAppMessages").getString("race.config.totalNbrGates"));
    panel1.add(label4, cc.xy(1, 7));
    panel1.add(nbrGates, cc.xyw(3, 7, 3, CellConstraints.FILL, CellConstraints.DEFAULT));
    panel1.add(panelSectionConfig, cc.xyw(1, 11, 4, CellConstraints.CENTER, CellConstraints.FILL));
    doneButton = new JButton();
    doneButton.setText("Done");
    panel1.add(doneButton, cc.xyw(1, 13, 4));
    panel1.add(dateSpinner1, cc.xy(3, 3, CellConstraints.FILL, CellConstraints.DEFAULT));
}

From source file:com.tcay.slalom.UI.RacePenaltiesUIDynamicOrig.java

License:Open Source License

private void addDynToForm() {
    CellConstraints cc = new CellConstraints();
    int row = 0;/*from ww w.j av a  2 s  .  c  o  m*/
    for (int i = 0; i < nbrGates * 3; i++) {
        if (i % 3 == 0)
            panel1.add(new JLabel("Gate " + ((i / 3) + 1)), cc.xy(1, (3 + (row * 2)))); // todo move to single load time instantiation
        panel1.add(buttons[i], cc.xy(((i % 3) * 2) + 3, (3 + (row * 2))));
        if (i % 3 == 2) {
            row++;
        }
    }
}

From source file:com.tcay.slalom.UI.RacePenaltiesUIDynamicOrig.java

License:Open Source License

private void setupUI() {
    createUIComponents();/*w  w  w. j ava  2s  .  co  m*/
    panel1 = new JPanel();

    panel1.setLayout(new FormLayout(
            "fill:140px:grow,left:4dlu:noGrow,fill:139px:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:139px:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:29dlu:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,fill:max(d;4px):noGrow",
            "center:d:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow"));
    panel1.setBorder(
            BorderFactory.createTitledBorder(BorderFactory.createLoweredBevelBorder(), "Penalty Scoring"));
    CellConstraints cc = new CellConstraints();
    panel1.add(activeOrRecentRunsComboBox, cc.xyw(3, 1, 4));
    selectRaceRun = new JButton();
    selectRaceRun.setText("Select Boat");
    panel1.add(selectRaceRun, cc.xy(7, 1));
    doneBtn.setText("Done");
    panel1.add(doneBtn, cc.xy(5, (nbrGates * 2) + 3));
    //  final Spacer spacer1 = new Spacer();
    //  panel1.add(spacer1, cc.xy(5, 13, CellConstraints.DEFAULT, CellConstraints.FILL));
}

From source file:com.tcay.slalom.UI.RacePenaltiesUI_REFERENCE.java

License:Open Source License

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL//w  w w  . j  a  v  a  2 s  .c o  m
 */
private void $$$setupUI$$$() {
    createUIComponents();
    panel1 = new JPanel();
    panel1.setLayout(new FormLayout(
            "fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:d:grow,left:4dlu:noGrow,fill:d:grow,left:4dlu:noGrow,fill:d:grow,left:4dlu:noGrow,fill:max(d;4px):noGrow",
            "center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:d:grow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:d:grow,top:3dlu:noGrow,center:max(d;4px):noGrow"));
    panel1.setMinimumSize(new Dimension(513, 200));
    panel1.setOpaque(false);
    panel1.setPreferredSize(new Dimension(513, 200));
    panel1.setBorder(
            BorderFactory.createTitledBorder(BorderFactory.createLoweredBevelBorder(), "Penalty Scoring"));
    CellConstraints cc = new CellConstraints();
    panel1.add(activeOrRecentRunsComboBox, cc.xyw(3, 1, 4));
    rb1_Touch.setText("Touch (2)");
    panel1.add(rb1_Touch, cc.xy(5, 5));
    rb1_Clean.setText("Clean");
    panel1.add(rb1_Clean, cc.xy(3, 5));
    panel1.add(gate1Label, cc.xy(1, 5));
    final JLabel label1 = new JLabel();
    label1.setText("Racer");
    panel1.add(label1, cc.xy(1, 3));
    rb1_50.setText("Missed (50)");
    panel1.add(rb1_50, cc.xywh(7, 5, 1, 2));
    panel1.add(raceRunLabel, cc.xy(3, 3));
    selectRaceRun = new JButton();
    selectRaceRun.setText("Select Boat");
    panel1.add(selectRaceRun, cc.xy(7, 1));
    rb2_Touch.setText("Touch (2)");
    panel1.add(rb2_Touch, cc.xy(5, 9));
    rb2_Clean.setText("Clean");
    panel1.add(rb2_Clean, cc.xy(3, 9));
    panel1.add(gate2Label, cc.xy(1, 9));
    rb2_50.setText("Missed (50)");
    panel1.add(rb2_50, cc.xy(7, 9));
    rb3_Touch.setText("Touch (2)");
    panel1.add(rb3_Touch, cc.xy(5, 13));
    rb3_Clean.setText("Clean");
    panel1.add(rb3_Clean, cc.xy(3, 13));
    panel1.add(gate3Label, cc.xy(1, 13));
    rb3_50.setText("Missed (50)");
    panel1.add(rb3_50, cc.xy(7, 13));
    doneBtn.setText("Done");
    panel1.add(doneBtn, cc.xy(5, 17));
    final Spacer spacer1 = new Spacer();
    panel1.add(spacer1, cc.xy(5, 15, CellConstraints.DEFAULT, CellConstraints.FILL));
    final Spacer spacer2 = new Spacer();
    panel1.add(spacer2, cc.xy(5, 11, CellConstraints.DEFAULT, CellConstraints.FILL));
    final JLabel label2 = new JLabel();
    label2.setText("Section 2");
    panel1.add(label2, cc.xy(1, 11));
    final JScrollPane scrollPane1 = new JScrollPane();
    panel1.add(scrollPane1, cc.xy(1, 1, CellConstraints.FILL, CellConstraints.FILL));
}

From source file:com.tcay.slalom.UI.RaceSelector.java

License:Open Source License

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL//  w ww  .ja v  a  2  s.c  om
 */
private void $$$setupUI$$$() {
    createUIComponents();
    panel1 = new JPanel();
    panel1.setLayout(new FormLayout(
            "fill:max(d;4px):noGrow,left:23dlu:noGrow,fill:d:grow,left:4dlu:noGrow,fill:max(d;4px):noGrow",
            "center:d:noGrow"));
    CellConstraints cc = new CellConstraints();
    panel1.add(raceChoices, cc.xy(3, 1));
    final JLabel label1 = new JLabel();
    label1.setText("Races");
    panel1.add(label1, cc.xy(1, 1));
    loadButton = new JButton();
    loadButton.setText("Load");
    panel1.add(loadButton, cc.xy(5, 1));
}