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.tcay.slalom.UI.RaceTimingBoatOnCourseUI.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 o  m
 */
private void $$$setupUI$$$() {
    createUIComponents();
    subPanel = new JPanel();
    subPanel.setLayout(new FormLayout(
            "fill:105px:noGrow,left:4dlu:noGrow,fill:58px:noGrow,left:5dlu:noGrow,fill:186px:noGrow,left:4dlu:noGrow,fill:142px:noGrow,fill:8px:noGrow,fill:54px:noGrow,left:4dlu:noGrow,fill:88px:noGrow",
            "center:64px:noGrow"));
    finishButton = new JButton();
    finishButton.setBackground(Color.red);
    finishButton.setMargin(new Insets(0, 4, 0, 4));
    finishButton.setMaximumSize(new Dimension(82, 40));
    finishButton.setMinimumSize(new Dimension(82, 40));
    finishButton.setOpaque(true);
    finishButton.setPreferredSize(new Dimension(82, 40));
    finishButton.setText("Finish");
    finishButton.setToolTipText("Stop timer for this boat");
    CellConstraints cc = new CellConstraints();
    subPanel.add(finishButton, cc.xy(1, 1));
    subPanel.add(timerLabel, cc.xy(7, 1));
    subPanel.add(bibLabel, cc.xy(3, 1));
    DNFButton = new JButton();
    DNFButton.setBackground(Color.yellow);
    DNFButton.setOpaque(true);
    DNFButton.setText("DNF");
    DNFButton.setToolTipText("Mark boat as DID NOT FINISH");
    subPanel.add(DNFButton, cc.xy(9, 1));
    nameLabel = new JLabel();
    subPanel.add(nameLabel, cc.xy(5, 1));
    overtakeButton = new JButton();
    overtakeButton.setBackground(new Color(-52225));
    overtakeButton.setOpaque(true);
    overtakeButton.setText("Overtake");
    subPanel.add(overtakeButton, cc.xy(11, 1));
}

From source file:com.tcay.slalom.UI.RaceTimingUI.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/*  ww  w  .  j  ava2s .  c o m*/
 */
private void $$$setupUI$$$() {
    createUIComponents();
    mainPanel = new JPanel();
    mainPanel.setLayout(new GridLayoutManager(6, 1, new Insets(0, 0, 0, 0), -1, -1));
    selectRacerPanel = new JPanel();
    selectRacerPanel.setLayout(new FormLayout(
            "fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:267px:noGrow,left:12dlu:noGrow,fill:max(d;4px):noGrow,left:51dlu:noGrow,fill:85px:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow",
            "top:29px:grow,top:6dlu:noGrow,center:32px:noGrow"));
    selectRacerPanel.setToolTipText(
            "Start list contains all boats that are registered and have not yet compoleted the current run in progress");
    mainPanel.add(selectRacerPanel,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                    new Dimension(658, 84), null, 0, false));
    selectRacerPanel.setBorder(
            BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.black), "Start List"));
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new BorderLayout(0, 0));
    CellConstraints cc = new CellConstraints();
    selectRacerPanel.add(panel1, cc.xy(7, 1));
    newRunButton = new JButton();
    newRunButton.setBackground(Color.pink);
    newRunButton.setOpaque(true);
    newRunButton.setText("New Run");
    newRunButton.setToolTipText("Select next run e.g. second runs");
    panel1.add(newRunButton, BorderLayout.NORTH);
    reRunButton = new JButton();
    reRunButton.setBackground(Color.pink);
    reRunButton.setOpaque(true);
    reRunButton.setText("Re-Run");
    reRunButton.setToolTipText("Select a boat to do a Re-run, this Re-Run will replace their existing run ");
    selectRacerPanel.add(reRunButton, cc.xy(7, 3));
    startListSelectRacerReadyButton = new JButton();
    startListSelectRacerReadyButton.setBackground(Color.green);
    startListSelectRacerReadyButton.setOpaque(true);
    startListSelectRacerReadyButton.setText("Select Racer");
    startListSelectRacerReadyButton.setToolTipText(
            "put selected boat from the start list into the starting block (replaces boat currently in starting block)");
    startListSelectRacerReadyButton.setVerticalAlignment(3);
    selectRacerPanel.add(startListSelectRacerReadyButton,
            cc.xy(5, 3, CellConstraints.DEFAULT, CellConstraints.BOTTOM));
    startListComboBox.setBackground(Color.green);
    startListComboBox.setOpaque(true);
    startListComboBox.setToolTipText("List of all boats that have not yet started the current run");
    selectRacerPanel.add(startListComboBox, cc.xy(3, 3, CellConstraints.DEFAULT, CellConstraints.BOTTOM));
    final JLabel label1 = new JLabel();
    label1.setText("Boats that have not started this run");
    selectRacerPanel.add(label1, cc.xy(3, 1, CellConstraints.DEFAULT, CellConstraints.BOTTOM));
    adjustButton = new JButton();
    adjustButton.setBackground(new Color(-1178868));
    adjustButton.setOpaque(true);
    adjustButton.setText("Adjust");
    selectRacerPanel.add(adjustButton, cc.xy(9, 3));
    startPanel = new JPanel();
    startPanel.setLayout(new FormLayout(
            "fill:53px:noGrow,left:4dlu:noGrow,fill:219px:noGrow,left:12dlu:noGrow,fill:118px:noGrow,left:52dlu:noGrow,fill:85px:noGrow",
            "center:30px:noGrow,top:7dlu:noGrow,center:max(d;4px):noGrow"));
    startPanel.setToolTipText("Starting block is the boat that is about to begin racing");
    mainPanel.add(startPanel,
            new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                    null, 0, false));
    startPanel.setBorder(
            BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.black), "Starting Block"));
    startButton = new JButton();
    startButton.setBackground(Color.green);
    startButton.setOpaque(true);
    startButton.setText("Start");
    startButton.setToolTipText("Start timer for this boat");
    startPanel.add(startButton, cc.xy(5, 1));
    DNSButton = new JButton();
    DNSButton.setBackground(Color.pink);
    DNSButton.setOpaque(true);
    DNSButton.setText("DNS");
    DNSButton.setToolTipText("Mark boat as DID NOT START");
    startPanel.add(DNSButton, cc.xy(7, 1));
    waitingForAFinishLabel = new JLabel();
    waitingForAFinishLabel.setForeground(Color.red);
    waitingForAFinishLabel.setText("Waiting for a finish or DNF");
    startPanel.add(waitingForAFinishLabel, cc.xyw(5, 3, 2));
    jRacerInStartGateLabel = new JLabel();
    startPanel.add(jRacerInStartGateLabel, cc.xy(3, 1));
    startPanel.add(bibLabel, cc.xy(1, 1));
    spacerForLayoutManager = new JLabel();
    startPanel.add(spacerForLayoutManager, cc.xy(3, 3));
    finishPanel = new JPanel();
    finishPanel.setLayout(new FormLayout(
            "fill:134px:noGrow,left:4dlu:noGrow,fill:48px:noGrow,left:8dlu:noGrow,fill:179px:noGrow,left:5dlu:noGrow,fill:117px:noGrow,fill:14px:noGrow,fill:85px:noGrow,left:28dlu: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"));
    finishPanel.setToolTipText("Finish Line shows all boats currently started and on the course");
    mainPanel.add(finishPanel,
            new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null,
                    new Dimension(634, 155), null, 0, false));
    finishPanel.setBorder(
            BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.black), "Finish Line"));
    finishPanel.add(innerFinishPanel1, cc.xyw(1, 1, 10));
    finishPanel.add(innerFinishPanel2, cc.xyw(1, 3, 10));
    finishPanel.add(innerFinishPanel3, cc.xyw(1, 5, 10));
    final Spacer spacer1 = new Spacer();
    mainPanel.add(spacer1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
            GridConstraints.FILL_VERTICAL, 1, 1, null, null, null, 0, false));
    final Spacer spacer2 = new Spacer();
    mainPanel.add(spacer2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
            GridConstraints.FILL_VERTICAL, 1, 1, null, null, null, 0, false));
    statusBarPanel = new JPanel();
    statusBarPanel.setLayout(new FormLayout("fill:d:grow", "center:d:grow"));
    mainPanel.add(statusBarPanel,
            new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1,
                    new Dimension(-1, 20), new Dimension(-1, 20), null, 0, false));
}

From source file:com.tcay.slalom.UI.SectionConfigUI.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 www .j  a va  2s .c om*/
 */
private void $$$setupUI$$$() {
    createUIComponents();
    panel1 = new JPanel();
    panel1.setLayout(new FormLayout(
            "fill:247px:noGrow,left:5dlu:noGrow,fill:74px:noGrow,left:4dlu:noGrow,fill:74px:noGrow,left:23dlu:noGrow,fill:max(d;4px):noGrow",
            "center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:12px:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu: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:29px:noGrow,top:3dlu:noGrow,top:19dlu:noGrow,center:max(d;4px):noGrow,center:174px:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow"));
    CellConstraints cc = new CellConstraints();
    panel1.add(comboBoxSection1, cc.xy(5, 7));
    section1Label = new JLabel();
    section1Label.setText("Section 1");
    panel1.add(section1Label, cc.xy(3, 7));
    section2Label = new JLabel();
    section2Label.setText("Section 2");
    panel1.add(section2Label, cc.xy(3, 10));
    panel1.add(comboBoxSection2, cc.xy(5, 10));
    section3Label = new JLabel();
    section3Label.setText("Section 3");
    panel1.add(section3Label, cc.xy(3, 12));
    panel1.add(comboBoxSection3, cc.xy(5, 12));
    section4Label = new JLabel();
    section4Label.setText("Section 4");
    panel1.add(section4Label, cc.xy(3, 14));
    panel1.add(comboBoxSection4, cc.xy(5, 14));
    final JLabel label1 = new JLabel();
    this.$$$loadLabelText$$$(label1,
            ResourceBundle.getBundle("resources/SlalomAppMessages").getString("sectionConfig.lastGate"));
    panel1.add(label1, cc.xy(5, 3));
    section5Label = new JLabel();
    section5Label.setText("Section 5");
    panel1.add(section5Label, cc.xy(3, 16));
    panel1.add(comboBoxSection5, cc.xy(5, 16));
    final JList list1 = new JList();
    list1.setToolTipText(
            "Causes diagrams for touches and reason codes for 50s to appear when assessing penalties");
    panel1.add(list1, cc.xy(5, 21, CellConstraints.DEFAULT, CellConstraints.FILL));
    final JScrollPane scrollPane1 = new JScrollPane();
    panel1.add(scrollPane1, cc.xy(5, 20, CellConstraints.DEFAULT, CellConstraints.FILL));
    scrollPane1.setViewportView(upstreamCheckBoxList);
    doneButton.setText("Done");
    panel1.add(doneButton, cc.xy(1, 23));
    final JLabel label2 = new JLabel();
    this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle("resources/SlalomAppMessages")
            .getString("sectionConfig.sectionConfiguration"));
    panel1.add(label2, cc.xyw(3, 1, 5, CellConstraints.CENTER, CellConstraints.DEFAULT));
    final JLabel label3 = new JLabel();
    this.$$$loadLabelText$$$(label3,
            ResourceBundle.getBundle("resources/SlalomAppMessages").getString("sectionConfig.advancedOptions"));
    panel1.add(label3, cc.xy(1, 1));
    final JLabel label4 = new JLabel();
    this.$$$loadLabelText$$$(label4, ResourceBundle.getBundle("resources/SlalomAppMessages")
            .getString("sectionConfig.selectUpstreamGates"));
    panel1.add(label4, cc.xyw(3, 19, 4, CellConstraints.CENTER, CellConstraints.DEFAULT));
    final JLabel label5 = new JLabel();
    label5.setFont(new Font(label5.getFont().getName(), label5.getFont().getStyle(), 8));
    label5.setText("to be moved to Advanced Options page");
    panel1.add(label5, cc.xy(1, 3));
    this.$$$loadButtonText$$$(icfPenaltyDiagrams,
            ResourceBundle.getBundle("resources/SlalomAppMessages").getString("sectionConfig.useIcfPenalties"));
    icfPenaltyDiagrams.setToolTipText(ResourceBundle.getBundle("resources/SlalomAppMessages")
            .getString("sectionConfig.icfPenaltyDiagrams.tooltip"));
    panel1.add(icfPenaltyDiagrams, cc.xy(1, 7));
    this.$$$loadButtonText$$$(useTAGHeuerPhotoEyes, ResourceBundle.getBundle("resources/SlalomAppMessages")
            .getString("sectionConfig.useTagHeuerEmulation.tooltip"));
    useTAGHeuerPhotoEyes.setToolTipText(ResourceBundle.getBundle("resources/SlalomAppMessages")
            .getString("sectionConfig.useTagHeuerEmulation.tooltip"));
    panel1.add(useTAGHeuerPhotoEyes, cc.xy(1, 12));
    this.$$$loadButtonText$$$(useMicrogatePhotoEyesCheckBox,
            ResourceBundle.getBundle("resources/SlalomAppMessages").getString("sectionConfig.useMicrogate"));
    useMicrogatePhotoEyesCheckBox.setToolTipText(ResourceBundle.getBundle("resources/SlalomAppMessages")
            .getString("sectionConfig.useMicrogate.tooltip"));
    panel1.add(useMicrogatePhotoEyesCheckBox, cc.xy(1, 14));
    this.$$$loadButtonText$$$(useTimyPhotoEyesCheckBox,
            ResourceBundle.getBundle("resources/SlalomAppMessages").getString("sectionConfig.useTimy"));
    useTimyPhotoEyesCheckBox.setToolTipText(
            ResourceBundle.getBundle("resources/SlalomAppMessages").getString("sectionConfig.useTimy.tooltip"));
    panel1.add(useTimyPhotoEyesCheckBox, cc.xy(1, 16));
}

From source file:com.tcay.slalom.UI.TrainingTimingUI.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 www. jav a2  s  . com*/
 */
private void $$$setupUI$$$() {
    createUIComponents();
    panel1 = new JPanel();
    panel1.setLayout(new FormLayout("fill:d:grow",
            "center:d:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow"));
    panel1.setBackground(new Color(-16777216));
    final JLabel label1 = new JLabel();
    label1.setForeground(new Color(-65485));
    label1.setText("Current Run");
    CellConstraints cc = new CellConstraints();
    panel1.add(label1, cc.xy(1, 1));
    currentTimeSSSdotHH.setBackground(new Color(-16777216));
    currentTimeSSSdotHH.setFont(new Font("MT Extra", Font.BOLD, 72));
    currentTimeSSSdotHH.setForeground(UIManager.getColor("InternalFrame.borderDarkShadow"));
    currentTimeSSSdotHH.setText("999.99");
    panel1.add(currentTimeSSSdotHH, cc.xy(1, 5, CellConstraints.CENTER, CellConstraints.DEFAULT));
    racerName = new JLabel();
    racerName.setForeground(new Color(-65485));
    racerName.setText("Label");
    panel1.add(racerName, cc.xy(1, 3));
}

From source file:com.tecnoven.notify.ui.MainFrame.java

private JPanel buildInitForm() {
    FormLayout layout = new FormLayout("fill:50px:grow(.25), fill:50px:grow",
            "fill:" + this.getHeight() + "px:grow");
    PanelBuilder builder = new PanelBuilder(layout);
    builder.setDefaultDialogBorder();// w  w  w. ja  v a2 s.  c o m
    // Obtain a reusable constraints object to place components in the grid.
    CellConstraints cc = new CellConstraints();
    builder.add(this.jScrollPane1, cc.xy(1, 1));
    builder.add(this.main, cc.xy(2, 1));
    JPanel content = builder.getPanel();
    return content;
}

From source file:com.tecnoven.notify.ui.NotifyBulkNotificationDispatch.java

private void buildForm() {
    FormLayout layout = new FormLayout(
            "max(50dlu;min), 3dlu,right:pref, 3dlu,fill:pref:grow, 7dlu, fill:pref:grow, 3dlu, 50dlu, max(90dlu;min)", // columns
            "p, 3dlu, p, 3dlu, p, 3dlu,p, 3dlu, max(50dlu;min), 9dlu, p, 9dlu, max(150dlu;min), 10dlu, p, 9dlu, 9dlu , 9dlu, p , 9dlu, p"); // rows
    layout.setColumnGroups(new int[][] { { 3 }, { 5, 7 } });
    PanelBuilder builder = new PanelBuilder(layout);
    builder.setDefaultDialogBorder();/*from   ww  w. j ava  2 s .  c o m*/
    CellConstraints cc = new CellConstraints();
    builder.addSeparator("Carga Masiva de Datos", cc.xyw(1, 1, 10));
    builder.addLabel(templateLabel.getText(), cc.xy(3, 3));
    builder.add(templateText, cc.xyw(5, 3, 3));
    builder.add(catalogueButton, cc.xy(9, 3));

    builder.addLabel(fileLabel.getText(), cc.xy(3, 5));
    builder.add(fileSelectedText, cc.xyw(5, 5, 3));
    builder.add(searchButton, cc.xy(9, 5));

    if (LicenseManager.getInstance().getLicense().getListSupportedServices().length > 1) {
        builder.addLabel("Tipo de Notificaci\u00f3n", cc.xy(3, 7));
        builder.add(typeList, cc.xyw(5, 7, 3));
    }

    builder.addSeparator("Resultado", cc.xyw(1, 9, 10));

    builder.add(jScrollPane1, cc.xywh(5, 10, 3, 4));
    builder.addSeparator("", cc.xyw(1, 19, 10));

    builder.add(this.executeProcess, cc.xyw(5, 21, 3));

    JPanel content = builder.getPanel();
    this.removeAll();
    this.setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
    this.add(content);
}

From source file:com.tibco.util.gui.forms.JmsStreamLicense.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    lblWarning = new JLabel();
    scrollPane1 = new JScrollPane();
    txtLicense = new JTextPane();
    buttonBar = new JPanel();
    okButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle("JmsStream License");
    setModal(true);//from   w  w w.  j  a v  a  2s.  c o  m
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    setResizable(false);
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout("default, $lcgap, 310dlu, $lcgap, default",
                    "default, $ugap, 2*(default, $lgap), [300dlu,min]:grow, $lgap, default"));

            //---- lblWarning ----
            lblWarning.setText("By using this software you agree to the following license agreement:");
            lblWarning.setFont(new Font("Tahoma", Font.BOLD, 15));
            contentPanel.add(lblWarning, cc.xy(3, 3));

            //======== scrollPane1 ========
            {
                scrollPane1.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
                scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

                //---- txtLicense ----
                txtLicense.setText("text");
                txtLicense.setEditable(false);
                txtLicense.setFont(new Font("Courier New", Font.PLAIN, 11));
                scrollPane1.setViewportView(txtLicense);
            }
            contentPanel.add(scrollPane1, cc.xy(3, 7));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            buttonBar.setLayout(new FormLayout("$glue, $button", "pref"));

            //---- okButton ----
            okButton.setText("OK");
            okButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    okButtonActionPerformed();
                }
            });
            buttonBar.add(okButton, cc.xy(2, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
    txtLicense.setText(com.tibco.util.jmshelper.License.getLicenseAgreement());
    txtLicense.setCaretPosition(0); // Set the cursor to the top of the JTextPane
}

From source file:com.tibco.util.gui.JmsStreamForm.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    menuBar = new JMenuBar();
    menuFile = new JMenu();
    mnuNewConfig = new JMenuItem();
    mnuOpenConfig = new JMenuItem();
    mnuSaveConfigFile = new JMenuItem();
    mnuSaveConfigAs = new JMenuItem();
    mnuExit = new JMenuItem();
    menuTools = new JMenu();
    mnuConfiguration = new JMenuItem();
    mnuCreateFileJndi = new JMenuItem();
    mnuMessages = new JMenu();
    mnuNewMessages = new JMenuItem();
    mnuOpenMessages = new JMenuItem();
    mnuMsgEdit = new JMenuItem();
    mnuShowConfig = new JMenuItem();
    mnuGenCommandLine = new JMenuItem();
    menuHelp = new JMenu();
    mnuShowHelp = new JMenuItem();
    mnuLicense = new JMenuItem();
    mnuAbout = new JMenuItem();
    toolBarParent = new JToolBar();
    toolBar = new JToolBar();
    btnNewConfig = new JButton();
    btnOpenConfig = new JButton();
    btnSaveConfig = new JButton();
    btnConfigEdit = new JButton();
    btnShowConf = new JButton();
    btnGenCommandLine = new JButton();
    btnCreateFileJndi = new JButton();
    btnHelp = new JButton();
    dialogPane = new JPanel();
    buttonBar = new JPanel();
    btnStart = new JButton();
    btnStop = new JButton();
    btnPauseScreen = new JToggleButton();
    brnClearScreen = new JButton();
    panelMemory = new JPanel();
    lblMemory = new JLabel();
    btnGc = new JButton();
    panelMain = new JScrollPane();
    panelOutput = new JPanel();
    txtOutput = new JTextArea();
    hSpacer = new JPanel(null);
    vSpacer1 = new JPanel(null);
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setIconImage(/*from   ww  w  .  j  a v a  2s .co m*/
            new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/tibrv_ico.gif")).getImage());
    setTitle("JmsStream");
    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    setFont(new Font("Dialog", Font.PLAIN, 12));
    setForeground(Color.white);
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout("default:grow", "fill:default, fill:default:grow"));

    //======== menuBar ========
    {

        //======== menuFile ========
        {
            menuFile.setText("File");
            menuFile.setMnemonic('F');

            //---- mnuNewConfig ----
            mnuNewConfig.setText("New Configuration...");
            mnuNewConfig.setMnemonic('C');
            mnuNewConfig.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    mnuNewConfigActionPerformed();
                }
            });
            menuFile.add(mnuNewConfig);

            //---- mnuOpenConfig ----
            mnuOpenConfig.setText("Open Configuration...");
            mnuOpenConfig.setMnemonic('C');
            mnuOpenConfig.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    mnuOpenConfigActionPerformed();
                }
            });
            menuFile.add(mnuOpenConfig);

            //---- mnuSaveConfigFile ----
            mnuSaveConfigFile.setText("Save Configuration");
            mnuSaveConfigFile.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_MASK));
            mnuSaveConfigFile.setMnemonic('S');
            mnuSaveConfigFile.setEnabled(false);
            mnuSaveConfigFile.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    mnuSaveConfigFileActionPerformed();
                }
            });
            menuFile.add(mnuSaveConfigFile);

            //---- mnuSaveConfigAs ----
            mnuSaveConfigAs.setText("Save Configuration As...");
            mnuSaveConfigAs.setMnemonic('A');
            mnuSaveConfigAs.setEnabled(false);
            mnuSaveConfigAs.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    mnuSaveConfigAsActionPerformed();
                }
            });
            menuFile.add(mnuSaveConfigAs);
            menuFile.addSeparator();

            //---- mnuExit ----
            mnuExit.setText("Exit");
            mnuExit.setMnemonic('E');
            mnuExit.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    mnuExitActionPerformed();
                }
            });
            menuFile.add(mnuExit);
        }
        menuBar.add(menuFile);

        //======== menuTools ========
        {
            menuTools.setText("Tools");
            menuTools.setMnemonic('T');

            //---- mnuConfiguration ----
            mnuConfiguration.setText("Edit Configuration...");
            mnuConfiguration.setMnemonic('E');
            mnuConfiguration.setEnabled(false);
            mnuConfiguration.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    mnuConfigurationActionPerformed();
                }
            });
            menuTools.add(mnuConfiguration);
            menuTools.addSeparator();

            //---- mnuCreateFileJndi ----
            mnuCreateFileJndi.setText("Create a File Based JNDI...");
            mnuCreateFileJndi.setMnemonic('C');
            mnuCreateFileJndi.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    mnuCreateFileJndiActionPerformed();
                }
            });
            menuTools.add(mnuCreateFileJndi);

            //======== mnuMessages ========
            {
                mnuMessages.setText("Messages");
                mnuMessages.setSelectedIcon(null);
                mnuMessages.setMnemonic('M');

                //---- mnuNewMessages ----
                mnuNewMessages.setText("New Message File...");
                mnuNewMessages.setMnemonic('N');
                mnuNewMessages.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        mnuNewMessagesActionPerformed();
                    }
                });
                mnuMessages.add(mnuNewMessages);

                //---- mnuOpenMessages ----
                mnuOpenMessages.setText("Edit Message File...");
                mnuOpenMessages.setMnemonic('E');
                mnuOpenMessages.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        mnuOpenMessagesActionPerformed();
                    }
                });
                mnuMessages.add(mnuOpenMessages);

                //---- mnuMsgEdit ----
                mnuMsgEdit.setText("Edit Current Messages...");
                mnuMsgEdit.setMnemonic('M');
                mnuMsgEdit.setEnabled(false);
                mnuMsgEdit.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        mnuMsgEditActionPerformed();
                    }
                });
                mnuMessages.add(mnuMsgEdit);
            }
            menuTools.add(mnuMessages);

            //---- mnuShowConfig ----
            mnuShowConfig.setText("Show Configuration");
            mnuShowConfig.setMnemonic('S');
            mnuShowConfig.setEnabled(false);
            mnuShowConfig.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    mnuShowConfigActionPerformed();
                }
            });
            menuTools.add(mnuShowConfig);

            //---- mnuGenCommandLine ----
            mnuGenCommandLine.setText("Display Command Line");
            mnuGenCommandLine.setEnabled(false);
            mnuGenCommandLine.setMnemonic('D');
            mnuGenCommandLine.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    mnuGenCommandLineActionPerformed();
                }
            });
            menuTools.add(mnuGenCommandLine);
        }
        menuBar.add(menuTools);

        //======== menuHelp ========
        {
            menuHelp.setText("Help");
            menuHelp.setMnemonic('H');

            //---- mnuShowHelp ----
            mnuShowHelp.setText("Help Topics...");
            mnuShowHelp.setIcon(
                    new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/menu-help.png")));
            mnuShowHelp.setMnemonic('H');
            mnuShowHelp.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    mnuShowHelpActionPerformed();
                }
            });
            menuHelp.add(mnuShowHelp);

            //---- mnuLicense ----
            mnuLicense.setText("License...");
            mnuLicense.setMnemonic('L');
            mnuLicense.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    mnuLicenseActionPerformed();
                }
            });
            menuHelp.add(mnuLicense);
            menuHelp.addSeparator();

            //---- mnuAbout ----
            mnuAbout.setText("About");
            mnuAbout.setMnemonic('A');
            mnuAbout.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    mnuAboutActionPerformed();
                }
            });
            menuHelp.add(mnuAbout);
        }
        menuBar.add(menuHelp);
    }
    setJMenuBar(menuBar);

    //======== toolBarParent ========
    {
        toolBarParent.setFloatable(false);
        toolBarParent.setBorderPainted(false);
        toolBarParent.setBorder(null);

        //======== toolBar ========
        {
            toolBar.setForeground(SystemColor.control);

            //---- btnNewConfig ----
            btnNewConfig.setToolTipText("New Configuration");
            btnNewConfig.setIcon(
                    new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/fileNew.png")));
            btnNewConfig.setMargin(new Insets(2, 2, 1, 1));
            btnNewConfig.setMaximumSize(new Dimension(25, 25));
            btnNewConfig.setForeground(SystemColor.menu);
            btnNewConfig.setMinimumSize(new Dimension(25, 25));
            btnNewConfig.setPreferredSize(new Dimension(25, 25));
            btnNewConfig.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    btnNewConfigActionPerformed();
                }
            });
            toolBar.add(btnNewConfig);

            //---- btnOpenConfig ----
            btnOpenConfig.setIcon(
                    new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/fileOpen.png")));
            btnOpenConfig.setToolTipText("Open Configuration");
            btnOpenConfig.setMargin(new Insets(5, 2, 1, 1));
            btnOpenConfig.setForeground(SystemColor.menu);
            btnOpenConfig.setMaximumSize(new Dimension(25, 25));
            btnOpenConfig.setMinimumSize(new Dimension(25, 25));
            btnOpenConfig.setPreferredSize(new Dimension(25, 25));
            btnOpenConfig.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    btnOpenConfigActionPerformed();
                }
            });
            toolBar.add(btnOpenConfig);

            //---- btnSaveConfig ----
            btnSaveConfig.setIcon(
                    new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/fileSave2.png")));
            btnSaveConfig.setToolTipText("Save Configuration");
            btnSaveConfig.setMargin(new Insets(1, 2, 1, 1));
            btnSaveConfig.setEnabled(false);
            btnSaveConfig.setMaximumSize(new Dimension(25, 25));
            btnSaveConfig.setMinimumSize(new Dimension(25, 25));
            btnSaveConfig.setPreferredSize(new Dimension(25, 25));
            btnSaveConfig.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    btnConfigSaveActionPerformed();
                }
            });
            toolBar.add(btnSaveConfig);

            //---- btnConfigEdit ----
            btnConfigEdit.setToolTipText("Edit Current Configuration");
            btnConfigEdit.setIcon(
                    new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/fileEdit.png")));
            btnConfigEdit.setEnabled(false);
            btnConfigEdit.setMargin(new Insets(2, 2, 1, 1));
            btnConfigEdit.setMaximumSize(new Dimension(25, 25));
            btnConfigEdit.setMinimumSize(new Dimension(25, 25));
            btnConfigEdit.setPreferredSize(new Dimension(25, 25));
            btnConfigEdit.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    btnConfigEditActionPerformed();
                }
            });
            toolBar.add(btnConfigEdit);
            toolBar.addSeparator();

            //---- btnShowConf ----
            btnShowConf.setToolTipText("Display Configuration");
            btnShowConf.setIcon(
                    new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/information.png")));
            btnShowConf.setEnabled(false);
            btnShowConf.setMargin(new Insets(2, 2, 1, 1));
            btnShowConf.setMaximumSize(new Dimension(25, 25));
            btnShowConf.setMinimumSize(new Dimension(25, 25));
            btnShowConf.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    btnShowConfActionPerformed();
                }
            });
            toolBar.add(btnShowConf);

            //---- btnGenCommandLine ----
            btnGenCommandLine.setIcon(
                    new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/console.png")));
            btnGenCommandLine.setMargin(new Insets(2, 2, 1, 1));
            btnGenCommandLine.setEnabled(false);
            btnGenCommandLine.setToolTipText("Display Command Line Arguments");
            btnGenCommandLine.setMaximumSize(new Dimension(25, 25));
            btnGenCommandLine.setMinimumSize(new Dimension(25, 25));
            btnGenCommandLine.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    btnGenCommandLineActionPerformed();
                }
            });
            toolBar.add(btnGenCommandLine);

            //---- btnCreateFileJndi ----
            btnCreateFileJndi.setIcon(
                    new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/jndiCreate.png")));
            btnCreateFileJndi.setMargin(new Insets(2, 2, 1, 1));
            btnCreateFileJndi.setMaximumSize(new Dimension(25, 25));
            btnCreateFileJndi.setMinimumSize(new Dimension(25, 25));
            btnCreateFileJndi.setToolTipText("Create File Based JNDI");
            btnCreateFileJndi.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    btnCreateFileJndiActionPerformed();
                }
            });
            toolBar.add(btnCreateFileJndi);
            toolBar.addSeparator();

            //---- btnHelp ----
            btnHelp.setIcon(
                    new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/menu-help.png")));
            btnHelp.setMargin(new Insets(1, 2, 1, 1));
            btnHelp.setToolTipText("Output JmsStream Help");
            btnHelp.setMaximumSize(new Dimension(25, 25));
            btnHelp.setMinimumSize(new Dimension(25, 25));
            btnHelp.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    btnHelpActionPerformed();
                }
            });
            toolBar.add(btnHelp);
        }
        toolBarParent.add(toolBar);
    }
    contentPane.add(toolBarParent, cc.xy(1, 1));

    //======== dialogPane ========
    {
        dialogPane.setBorder(Borders.createEmptyBorder("1dlu, 4dlu, 4dlu, 4dlu"));
        dialogPane.setLayout(new FormLayout("default:grow", "fill:default:grow, fill:default"));

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.createEmptyBorder("5dlu, 1dlu, 1dlu, 1dlu"));
            buttonBar.setLayout(new FormLayout(
                    "$button, $rgap, $button, $glue, [50dlu,default], $lcgap, $button, $rgap, default",
                    "pref"));

            //---- btnStart ----
            btnStart.setText("Start");
            btnStart.setIcon(new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/start.png")));
            btnStart.setEnabled(false);
            btnStart.setMaximumSize(new Dimension(80, 30));
            btnStart.setMinimumSize(new Dimension(80, 30));
            btnStart.setPreferredSize(new Dimension(80, 30));
            btnStart.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    btnStartActionPerformed();
                }
            });
            buttonBar.add(btnStart, cc.xy(1, 1));

            //---- btnStop ----
            btnStop.setText("Stop");
            btnStop.setEnabled(false);
            btnStop.setIcon(new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/stop.png")));
            btnStop.setPreferredSize(new Dimension(80, 30));
            btnStop.setMaximumSize(new Dimension(80, 30));
            btnStop.setMinimumSize(new Dimension(80, 30));
            btnStop.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    btnStopActionPerformed();
                }
            });
            buttonBar.add(btnStop, cc.xy(3, 1));

            //---- btnPauseScreen ----
            btnPauseScreen.setText("Pause Screen");
            btnPauseScreen.setMaximumSize(new Dimension(260, 30));
            btnPauseScreen.setMinimumSize(new Dimension(130, 30));
            btnPauseScreen.setPreferredSize(new Dimension(130, 30));
            btnPauseScreen
                    .setIcon(new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/pause.png")));
            btnPauseScreen.setToolTipText("Pause the JmsStream GUI display screen.");
            btnPauseScreen.addItemListener(new ItemListener() {
                public void itemStateChanged(ItemEvent e) {
                    btnPauseScreenItemStateChanged(e);
                }
            });
            buttonBar.add(btnPauseScreen, cc.xy(5, 1));

            //---- brnClearScreen ----
            brnClearScreen.setMaximumSize(new Dimension(260, 30));
            brnClearScreen.setMinimumSize(new Dimension(130, 30));
            brnClearScreen.setPreferredSize(new Dimension(130, 30));
            brnClearScreen.setText("Clear Screen");
            brnClearScreen.setToolTipText("Clear the JmsStream GUI display screen.");
            brnClearScreen
                    .setIcon(new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/clear.png")));
            brnClearScreen.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    brnClearScreenActionPerformed();
                }
            });
            buttonBar.add(brnClearScreen, cc.xy(7, 1));

            //======== panelMemory ========
            {
                panelMemory.setBorder(new EtchedBorder(EtchedBorder.RAISED));
                panelMemory.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
                panelMemory.setLayout(new BoxLayout(panelMemory, BoxLayout.X_AXIS));

                //---- lblMemory ----
                lblMemory.setText("100MB of 200MB");
                lblMemory.setMaximumSize(new Dimension(90, 20));
                lblMemory.setMinimumSize(new Dimension(90, 20));
                lblMemory.setPreferredSize(new Dimension(90, 20));
                lblMemory.setHorizontalAlignment(SwingConstants.TRAILING);
                lblMemory.setForeground(Color.darkGray);
                lblMemory.setRequestFocusEnabled(false);
                lblMemory.setAlignmentY(0.0F);
                lblMemory.setVerticalAlignment(SwingConstants.BOTTOM);
                panelMemory.add(lblMemory);

                //---- btnGc ----
                btnGc.setMargin(new Insets(2, 2, 2, 2));
                btnGc.setIcon(new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/gc.png")));
                btnGc.setToolTipText("Run JVM Garbage Collector");
                btnGc.setBorderPainted(false);
                btnGc.setOpaque(false);
                btnGc.setContentAreaFilled(false);
                btnGc.setFocusPainted(false);
                btnGc.setRolloverIcon(
                        new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/gc_pushed.png")));
                btnGc.setAlignmentY(0.0F);
                btnGc.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        btnGcActionPerformed();
                    }
                });
                panelMemory.add(btnGc);
            }
            buttonBar.add(panelMemory, cc.xy(9, 1));
        }
        dialogPane.add(buttonBar, cc.xy(1, 2, CellConstraints.FILL, CellConstraints.DEFAULT));

        //======== panelMain ========
        {
            panelMain.setBorder(new BevelBorder(BevelBorder.LOWERED));
            panelMain.setViewportBorder(new BevelBorder(BevelBorder.RAISED));
            panelMain.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
            panelMain.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);

            //======== panelOutput ========
            {
                panelOutput
                        .setLayout(new FormLayout("default:grow, default", "fill:default:grow, fill:default"));

                //---- txtOutput ----
                txtOutput.setBackground(Color.black);
                txtOutput.setForeground(Color.lightGray);
                txtOutput.setBorder(new BevelBorder(BevelBorder.LOWERED));
                txtOutput.setAutoscrolls(false);
                txtOutput.setDoubleBuffered(true);
                txtOutput.setCaretColor(Color.white);
                txtOutput.setFocusCycleRoot(true);
                txtOutput.setFont(new Font("Monospaced", Font.PLAIN, 12));
                panelOutput.add(txtOutput, cc.xy(1, 1));
                panelOutput.add(hSpacer, cc.xy(2, 1));
                panelOutput.add(vSpacer1, cc.xy(1, 2));
            }
            panelMain.setViewportView(panelOutput);
        }
        dialogPane.add(panelMain, cc.xy(1, 1, CellConstraints.FILL, CellConstraints.FILL));
    }
    contentPane.add(dialogPane, cc.xy(1, 2, CellConstraints.FILL, CellConstraints.FILL));
    setSize(990, 600);
    setLocationRelativeTo(null);
    // JFormDesigner - End of component initialization  //GEN-END:initComponents

    // Now create a new TextAreaOutputStream to write to our JTextArea control and wrap a
    // PrintStream around it to support the println/printf methods.
    _taosTextArea = new TextAreaOutputStream(txtOutput);
    try {
        PrintStream psOut = new PrintStream(_taosTextArea, true, "UTF-8");

        // Redirect standard output stream to the TextAreaOutputStream
        System.setOut(psOut);
        // Redirect standard error stream to the TextAreaOutputStream
        System.setErr(psOut);
    } catch (UnsupportedEncodingException uee) {
        uee.printStackTrace();
    }

    // Set the Form Title
    this.setTitle(JmsStream.APP_NAME);
}

From source file:com.tiempometa.muestradatos.JAboutUs.java

License:Mozilla Public License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    ResourceBundle bundle = ResourceBundle.getBundle("com.tiempometa.muestradatos.muestradatos");
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    label4 = new JLabel();
    label1 = new JLabel();
    label2 = new JLabel();
    label3 = new JLabel();
    buttonBar = new JPanel();
    okButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle(bundle.getString("JAboutUs.this.title"));
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {//from w  w  w .ja v a 2 s  .c  om
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout(
                    new ColumnSpec[] { new ColumnSpec(Sizes.DLUX5), FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            FormFactory.DEFAULT_COLSPEC },
                    new RowSpec[] { new RowSpec(Sizes.dluY(26)), FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC }));

            //---- label4 ----
            label4.setIcon(new ImageIcon(
                    getClass().getResource("/com/tiempometa/resources/tiempometa_icon_large_alpha.png")));
            contentPanel.add(label4, cc.xy(3, 3));

            //---- label1 ----
            label1.setText(bundle.getString("JAboutUs.label1.text"));
            label1.setFont(new Font("Tahoma", Font.BOLD, 24));
            contentPanel.add(label1, cc.xy(5, 3));

            //---- label2 ----
            label2.setText(bundle.getString("JAboutUs.label2.text"));
            contentPanel.add(label2, cc.xy(5, 5));

            //---- label3 ----
            label3.setText(bundle.getString("JAboutUs.label3.text"));
            contentPanel.add(label3, cc.xy(5, 7));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            buttonBar.setLayout(
                    new FormLayout(new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC },
                            RowSpec.decodeSpecs("pref")));

            //---- okButton ----
            okButton.setText("OK");
            okButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    okButtonActionPerformed(e);
                }
            });
            buttonBar.add(okButton, cc.xy(2, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    setSize(615, 300);
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:com.tiempometa.muestradatos.JConfigDialog.java

License:Mozilla Public License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY
    // //GEN-BEGIN:initComponents
    ResourceBundle bundle = ResourceBundle.getBundle("com.tiempometa.muestradatos.muestradatos");
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    label4 = new JLabel();
    separator3 = new JSeparator();
    label5 = new JLabel();
    databaseTextField = new JTextField();
    databaseSelectButton = new JButton();
    label7 = new JLabel();
    separator2 = new JSeparator();
    label8 = new JLabel();
    readerBoxAddressTextField = new JTextField();
    label6 = new JLabel();
    readerTypeComboBox = new JComboBox<>();
    label10 = new JLabel();
    readerComboBox = new JComboBox<>();
    label9 = new JLabel();
    antennaComboBox = new JComboBox<>();
    label3 = new JLabel();
    separator1 = new JSeparator();
    label2 = new JLabel();
    commPortComboBox = new JComboBox<>();
    label1 = new JLabel();
    regionComboBox = new JComboBox<>();
    buttonBar = new JPanel();
    okButton = new JButton();
    cancelButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle(bundle.getString("JConfigDialog.this.title"));
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {//from  www  .  ja v  a2s  .c o m
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(Sizes.dluX(115)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(Sizes.dluX(73)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            FormFactory.DEFAULT_COLSPEC },
                    new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC }));

            //---- label4 ----
            label4.setText(bundle.getString("JConfigDialog.label4.text"));
            label4.setFont(new Font("Tahoma", Font.PLAIN, 18));
            contentPanel.add(label4, cc.xy(1, 1));
            contentPanel.add(separator3, cc.xywh(3, 1, 3, 1));

            //---- label5 ----
            label5.setText(bundle.getString("JConfigDialog.label5.text"));
            label5.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(label5, cc.xy(1, 3));
            contentPanel.add(databaseTextField, cc.xywh(3, 3, 3, 1));

            //---- databaseSelectButton ----
            databaseSelectButton.setText(bundle.getString("JConfigDialog.databaseSelectButton.text"));
            databaseSelectButton.setFont(new Font("Tahoma", Font.PLAIN, 14));
            databaseSelectButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    databaseSelectButtonActionPerformed(e);
                }
            });
            contentPanel.add(databaseSelectButton, cc.xy(5, 5));

            //---- label7 ----
            label7.setText(bundle.getString("JConfigDialog.label7.text"));
            label7.setFont(new Font("Tahoma", Font.PLAIN, 18));
            contentPanel.add(label7, cc.xy(1, 7));
            contentPanel.add(separator2, cc.xywh(3, 7, 3, 1));

            //---- label8 ----
            label8.setText(bundle.getString("JConfigDialog.label8.text"));
            label8.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(label8, cc.xy(1, 9));

            //---- readerBoxAddressTextField ----
            readerBoxAddressTextField.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(readerBoxAddressTextField, cc.xywh(3, 9, 3, 1));

            //---- label6 ----
            label6.setText(bundle.getString("JConfigDialog.label6.text"));
            label6.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(label6, cc.xy(1, 11));

            //---- readerTypeComboBox ----
            readerTypeComboBox.setModel(new DefaultComboBoxModel<>(new String[] { "Foxberry", "Speedway" }));
            readerTypeComboBox.setFont(new Font("Tahoma", Font.PLAIN, 14));
            readerTypeComboBox.addItemListener(new ItemListener() {
                @Override
                public void itemStateChanged(ItemEvent e) {
                    readerTypeComboBoxItemStateChanged(e);
                }
            });
            contentPanel.add(readerTypeComboBox, cc.xywh(3, 11, 3, 1));

            //---- label10 ----
            label10.setText(bundle.getString("JConfigDialog.label10.text"));
            label10.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(label10, cc.xy(1, 13));

            //---- readerComboBox ----
            readerComboBox
                    .setModel(new DefaultComboBoxModel<>(new String[] { "Todos", "Lector 1", "Lector 2" }));
            readerComboBox.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(readerComboBox, cc.xywh(3, 13, 3, 1));

            //---- label9 ----
            label9.setText(bundle.getString("JConfigDialog.label9.text"));
            label9.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(label9, cc.xy(1, 15));

            //---- antennaComboBox ----
            antennaComboBox.setModel(new DefaultComboBoxModel<>(
                    new String[] { "Todas", "Antena 1", "Antena 2", "Antena 3", "Antena 4" }));
            antennaComboBox.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(antennaComboBox, cc.xywh(3, 15, 3, 1));

            //---- label3 ----
            label3.setText(bundle.getString("JConfigDialog.label3.text"));
            label3.setFont(new Font("Tahoma", Font.PLAIN, 18));
            contentPanel.add(label3, cc.xy(1, 17));
            contentPanel.add(separator1, cc.xywh(3, 17, 3, 1));

            //---- label2 ----
            label2.setText(bundle.getString("JConfigDialog.label2.text"));
            label2.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(label2, cc.xy(1, 19));

            //---- commPortComboBox ----
            commPortComboBox.setModel(new DefaultComboBoxModel<>(new String[] { "COM1", "COM2", "COM3", "COM4",
                    "COM5", "COM6", "COM7", "COM8", "COM9", "COM10", "COM11", "COM12", "COM13", "COM14",
                    "COM15", "COM16", "COM17", "COM18", "COM19", "COM20" }));
            commPortComboBox.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(commPortComboBox, cc.xywh(3, 19, 3, 1));

            //---- label1 ----
            label1.setText(bundle.getString("JConfigDialog.label1.text"));
            label1.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(label1, cc.xy(1, 21));

            //---- regionComboBox ----
            regionComboBox.setModel(new DefaultComboBoxModel<>(
                    new String[] { "NA", "EU", "KR", "IN", "PRC", "EU2", "EU3", "KR2", "AU", "NZ", "OPEN" }));
            regionComboBox.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(regionComboBox, cc.xywh(3, 21, 3, 1));
        }
        dialogPane.add(contentPanel, BorderLayout.NORTH);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            buttonBar.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC,
                            FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                    RowSpec.decodeSpecs("pref")));

            //---- okButton ----
            okButton.setText("OK");
            okButton.setFont(new Font("Tahoma", Font.PLAIN, 14));
            okButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    okButtonActionPerformed(e);
                }
            });
            buttonBar.add(okButton, cc.xy(2, 1));

            //---- cancelButton ----
            cancelButton.setText("Cancel");
            cancelButton.setFont(new Font("Tahoma", Font.PLAIN, 14));
            cancelButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    cancelButtonActionPerformed(e);
                }
            });
            buttonBar.add(cancelButton, cc.xy(4, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // //GEN-END:initComponents
}