Example usage for javax.swing JTextField setText

List of usage examples for javax.swing JTextField setText

Introduction

In this page you can find the example usage for javax.swing JTextField setText.

Prototype

@BeanProperty(bound = false, description = "the text of this component")
public void setText(String t) 

Source Link

Document

Sets the text of this TextComponent to the specified text.

Usage

From source file:org.ut.biolab.medsavant.client.project.ProjectWizard.java

private AbstractWizardPage getNamePage() {

    //setup page//from   w  w  w  . j  a  v a2s .com
    final DefaultWizardPage page = new DefaultWizardPage(PAGENAME_NAME) {
        @Override
        public void setupWizardButtons() {
            fireButtonEvent(ButtonEvent.HIDE_BUTTON, ButtonNames.FINISH);
            fireButtonEvent(ButtonEvent.HIDE_BUTTON, ButtonNames.BACK);
            if (projectName == null || projectName.equals("")) {
                fireButtonEvent(ButtonEvent.DISABLE_BUTTON, ButtonNames.NEXT);
            } else {
                fireButtonEvent(ButtonEvent.ENABLE_BUTTON, ButtonNames.NEXT);
            }
        }
    };
    page.addText("Choose a name for the project. \n" + "The name cannot already be in use. ");

    //setup text field
    final JTextField namefield = new JTextField();
    namefield.addKeyListener(new KeyAdapter() {
        @Override
        public void keyReleased(KeyEvent e) {
            if (namefield.getText() != null && !namefield.getText().equals("")) {
                projectName = namefield.getText();
                page.fireButtonEvent(ButtonEvent.ENABLE_BUTTON, ButtonNames.NEXT);
            } else {
                page.fireButtonEvent(ButtonEvent.DISABLE_BUTTON, ButtonNames.NEXT);
            }
        }
    });
    page.addComponent(namefield);
    if (modify) {
        namefield.setText(projectName);
    }

    return page;
}

From source file:org.ut.biolab.medsavant.client.query.view.NumberSearchConditionEditorView.java

@Override
public void loadViewFromSearchConditionParameters(String encoding) throws ConditionRestorationException {

    double[] selectedValues;
    if (encoding == null) {
        selectedValues = null;/*from w  ww. j a v a  2 s .  c  o m*/
    } else {
        selectedValues = NumericConditionEncoder.unencodeConditions(encoding);
    }

    final double[] extremeValues = generator.getExtremeNumericValues();
    this.removeAll();

    if (extremeValues == null || (extremeValues[0] == 0 && extremeValues[1] == 0)) {
        JPanel p = new JPanel();
        p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
        p.add(Box.createHorizontalGlue());
        p.add(new JLabel("<html>All values are blank for this condition.</html>"));
        p.add(Box.createHorizontalGlue());
        this.add(p);
        return;
    }

    setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

    JPanel p = ViewUtil.getClearPanel();
    ViewUtil.applyVerticalBoxLayout(p);

    JPanel labelPanel = ViewUtil.getClearPanel();
    ViewUtil.applyHorizontalBoxLayout(labelPanel);
    labelPanel.add(Box.createHorizontalGlue());
    labelPanel.add(new JLabel("Filtering variants where " + item.getName() + ": "));
    labelPanel.add(Box.createHorizontalGlue());
    ButtonGroup group = new ButtonGroup();
    //JRadioButton isButton = new JRadioButton("is within the following range:");
    //JRadioButton nullButton = new JRadioButton("is missing");
    //group.add(isButton);
    //group.add(nullButton);

    final JCheckBox nullButton = new JCheckBox("include missing values");

    JPanel bp = ViewUtil.getClearPanel();
    ViewUtil.applyHorizontalBoxLayout(bp);
    p.add(labelPanel);
    p.add(bp);
    add(p);
    final DecimalRangeSlider slider = new DecimalRangeSlider();

    slider.setMajorTickSpacing(5);
    slider.setMinorTickSpacing(1);

    final JTextField fromBox = new JTextField();
    final JTextField toBox = new JTextField();

    nullButton.setSelected(NumericConditionEncoder.encodesNull(encoding));

    nullButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent ae) {
            encodeValue(ViewUtil.parseDoubleFromFormattedString(fromBox.getText()),
                    ViewUtil.parseDoubleFromFormattedString(toBox.getText()), extremeValues[0],
                    extremeValues[1], nullButton.isSelected());
        }
    });

    fromBox.setMaximumSize(new Dimension(10000, 24));
    toBox.setMaximumSize(new Dimension(10000, 24));
    fromBox.setPreferredSize(new Dimension(FROM_TO_WIDTH, 24));
    toBox.setPreferredSize(new Dimension(FROM_TO_WIDTH, 24));
    fromBox.setMinimumSize(new Dimension(FROM_TO_WIDTH, 24));
    toBox.setMinimumSize(new Dimension(FROM_TO_WIDTH, 24));
    fromBox.setHorizontalAlignment(JTextField.RIGHT);
    toBox.setHorizontalAlignment(JTextField.RIGHT);

    final JLabel fromLabel = new JLabel();
    final JLabel toLabel = new JLabel();

    ViewUtil.makeMini(fromLabel);
    ViewUtil.makeMini(toLabel);

    JPanel fromToContainer = ViewUtil.getClearPanel();
    ViewUtil.applyHorizontalBoxLayout(fromToContainer);
    fromToContainer.add(Box.createHorizontalGlue());
    fromToContainer.add(fromBox);
    fromToContainer.add(new JLabel(" - "));
    fromToContainer.add(toBox);
    fromToContainer.add(Box.createHorizontalGlue());

    JPanel minMaxContainer = ViewUtil.getClearPanel();
    minMaxContainer.setLayout(new BoxLayout(minMaxContainer, BoxLayout.X_AXIS));

    JPanel sliderContainer = ViewUtil.getClearPanel();
    sliderContainer.setLayout(new BoxLayout(sliderContainer, BoxLayout.Y_AXIS));
    sliderContainer.add(slider);

    JPanel nullValueContainer = ViewUtil.getClearPanel();
    ViewUtil.applyHorizontalBoxLayout(nullValueContainer);
    nullValueContainer.add(Box.createHorizontalGlue());
    nullValueContainer.add(nullButton);
    nullButton.setBackground(nullValueContainer.getBackground()); //fixes a windows issue.
    nullValueContainer.add(Box.createHorizontalGlue());

    JPanel labelContainer = ViewUtil.getClearPanel();
    labelContainer.setLayout(new BoxLayout(labelContainer, BoxLayout.X_AXIS));
    labelContainer.add(fromLabel);
    labelContainer.add(Box.createHorizontalGlue());
    labelContainer.add(toLabel);
    sliderContainer.add(labelContainer);
    minMaxContainer.add(Box.createHorizontalGlue());
    minMaxContainer.add(sliderContainer);
    minMaxContainer.add(Box.createHorizontalGlue());

    add(fromToContainer);
    add(minMaxContainer);
    add(nullValueContainer);
    add(Box.createVerticalBox());

    slider.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseReleased(MouseEvent e) {
            if (slider.isEnabled()) {
                fromBox.setText(ViewUtil.numToString(slider.getLow()));
                toBox.setText(ViewUtil.numToString(slider.getHigh()));
                encodeValue(ViewUtil.parseDoubleFromFormattedString(fromBox.getText()),
                        ViewUtil.parseDoubleFromFormattedString(toBox.getText()), extremeValues[0],
                        extremeValues[1], nullButton.isSelected());
            }
        }
    });

    final KeyListener keyListener = new KeyAdapter() {
        @Override
        public void keyReleased(KeyEvent e) {
            int key = e.getKeyCode();
            if (key == KeyEvent.VK_ENTER) {
                Range selectedRage = new Range(getNumber(fromBox.getText()), getNumber(toBox.getText()));
                setSelectedValues(slider, fromBox, toBox, selectedRage);
            }
        }

        private double getNumber(String s) {
            try {
                return Double.parseDouble(s.replaceAll(",", ""));
            } catch (NumberFormatException ignored) {
                return 0;
            }
        }
    };

    CaretListener caretListener = new CaretListener() {
        @Override
        public void caretUpdate(CaretEvent ce) {
            if (!isAdjustingSlider) {
                try {
                    encodeValue(ViewUtil.parseDoubleFromFormattedString(fromBox.getText()),
                            ViewUtil.parseDoubleFromFormattedString(toBox.getText()), extremeValues[0],
                            extremeValues[1], nullButton.isSelected());
                } catch (Exception e) {
                }
            }
        }
    };

    fromBox.addKeyListener(keyListener);

    toBox.addKeyListener(keyListener);

    fromBox.addCaretListener(caretListener);

    toBox.addCaretListener(caretListener);

    slider.addChangeListener(new ChangeListener() {
        @Override
        public void stateChanged(ChangeEvent e) {
            isAdjustingSlider = true;
            fromBox.setText(ViewUtil.numToString(slider.getLow()));
            toBox.setText(ViewUtil.numToString(slider.getHigh()));
            isAdjustingSlider = false;
        }
    });

    JPanel bottomContainer = new JPanel();

    bottomContainer.setLayout(new BoxLayout(bottomContainer, BoxLayout.X_AXIS));

    bottomContainer.add(Box.createHorizontalGlue());

    add(bottomContainer);

    setExtremeValues(slider, fromLabel, toLabel, fromBox, toBox, 0,
            new Range(extremeValues[0], extremeValues[1]));

    if (encoding != null) {
        double[] d = NumericConditionEncoder.unencodeConditions(encoding);
        setSelectedValues(slider, fromBox, toBox, new Range(d[0], d[1]));
    }
}

From source file:org.ut.biolab.medsavant.client.query.view.NumberSearchConditionEditorView.java

private void setExtremeValues(DecimalRangeSlider slider, JLabel fromLabel, JLabel toLabel, JTextField fromBox,
        JTextField toBox, int precision, Range extremeValues) {
    //if (columnName.equals("dp")) {
    //    extremeValues = new Range(Math.min(0, extremeValues.getMin()),extremeValues.getMax());
    //}//  ww w  . j a  v  a 2 s.  c o m

    int overallMin = (int) Math.floor(extremeValues.getMin());
    int overallMax = (int) Math.ceil(extremeValues.getMax());

    if (overallMax - overallMin <= 1) {
        precision = 2;
    } else if (overallMax - overallMin <= 10) {
        precision = 1;
    }

    slider.setPrecision(precision);

    slider.setMinimum(overallMin);
    slider.setMaximum(overallMax);

    slider.setLow(overallMin);
    slider.setHigh(overallMax);

    slider.updateUI();

    fromBox.setText(ViewUtil.numToString(overallMin));
    toBox.setText(ViewUtil.numToString(overallMax));

    fromLabel.setText(ViewUtil.numToString(overallMin));
    toLabel.setText(ViewUtil.numToString(overallMax));
}

From source file:org.ut.biolab.medsavant.client.query.view.NumberSearchConditionEditorView.java

private void setSelectedValues(DecimalRangeSlider slider, JTextField fromBox, JTextField toBox,
        Range selectedValues) {// w  ww  . j  a va2  s . c  om

    slider.setLow(selectedValues.getMin());
    slider.setHigh(selectedValues.getMax());

    fromBox.setText(ViewUtil.numToString(selectedValues.getMin()));
    toBox.setText(ViewUtil.numToString(selectedValues.getMax()));

    slider.updateUI();
}

From source file:org.ut.biolab.medsavant.client.variant.ExportVCFWizard.java

private AbstractDialogPage getFilePage() {

    final DefaultWizardPage page = new DefaultWizardPage("Choose File") {
        @Override//from  w  w w  .  ja v  a2 s. co m
        public void setupWizardButtons() {
            fireButtonEvent(ButtonEvent.HIDE_BUTTON, ButtonNames.FINISH);
            fireButtonEvent(ButtonEvent.SHOW_BUTTON, ButtonNames.BACK);
            if (variantFile != null) {
                fireButtonEvent(ButtonEvent.ENABLE_BUTTON, ButtonNames.NEXT);
            } else {
                fireButtonEvent(ButtonEvent.DISABLE_BUTTON, ButtonNames.NEXT);
            }
        }
    };

    page.addText("Choose the file to save to:");

    final JTextField outputFileField = new JTextField();
    outputFileField.setEnabled(false);
    JButton chooseFileButton = new JButton("...");
    chooseFileButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent ae) {
            variantFile = DialogUtils.chooseFileForSave("Export Variants", "export.vcf",
                    ExtensionFileFilter.createFilters(new String[] { "vcf" }), null);
            if (variantFile == null) {
                page.fireButtonEvent(ButtonEvent.DISABLE_BUTTON, ButtonNames.NEXT);
            } else {
                page.fireButtonEvent(ButtonEvent.ENABLE_BUTTON, ButtonNames.NEXT);
                outputFileField.setText(variantFile.getAbsolutePath());
            }
        }
    });
    JPanel container = new JPanel();
    ViewUtil.clear(container);
    ViewUtil.applyHorizontalBoxLayout(container);

    container.add(outputFileField);
    container.add(chooseFileButton);

    page.addComponent(container);
    page.addText("Files will be exported in Variant Call Format (*.vcf)");

    return page;
}

From source file:org.ut.biolab.medsavant.client.variant.ImportVariantsWizard.java

private AbstractWizardPage getAddTagsPage() {
    //setup page/*from   w  w  w .  j ava2s.c o  m*/
    final DefaultWizardPage page = new DefaultWizardPage("Add Tags") {
        @Override
        public void setupWizardButtons() {
            fireButtonEvent(ButtonEvent.HIDE_BUTTON, ButtonNames.FINISH);
            fireButtonEvent(ButtonEvent.SHOW_BUTTON, ButtonNames.BACK);
            fireButtonEvent(ButtonEvent.ENABLE_BUTTON, ButtonNames.NEXT);
        }
    };

    page.addText("Variants can be filtered by tag value in the Filter section.");
    page.addText("Add tags for this set of variants:");

    final String[] patternExamples = { "<Tag Name>", "Sequencer", "Sequencer Version", "Variant Caller",
            "Variant Caller Version", "Technician" };

    locationField = new JComboBox(patternExamples);
    locationField.setEditable(true);

    final JPanel tagContainer = new JPanel();
    ViewUtil.applyVerticalBoxLayout(tagContainer);

    final JTextField valueField = new JTextField();

    final String startingValue = "<Value>";
    valueField.setText(startingValue);

    final JTextArea ta = new JTextArea();
    ta.setRows(10);
    ta.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
    ta.setEditable(false);

    JLabel button = ViewUtil.createIconButton(IconFactory.getInstance().getIcon(IconFactory.StandardIcon.ADD));
    button.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent e) {

            if (locationField.getSelectedItem().toString().isEmpty()) {
                DialogUtils.displayError("Tag cannot be empty");
                locationField.requestFocus();
                return;
            } else if (locationField.getSelectedItem().toString().equals(patternExamples[0])) {
                DialogUtils.displayError("Enter a valid tag name");
                locationField.requestFocus();
                return;
            }

            if (valueField.getText().toString().isEmpty()) {
                DialogUtils.displayError("Value cannot be empty");
                valueField.requestFocus();
                return;
            } else if (valueField.getText().equals(startingValue)) {
                DialogUtils.displayError("Enter a valid value");
                valueField.requestFocus();
                return;
            }

            VariantTag tag = new VariantTag((String) locationField.getSelectedItem(), valueField.getText());

            variantTags.add(tag);
            ta.append(tag.toString() + "\n");
            valueField.setText("");
        }
    });

    JPanel container2 = new JPanel();
    ViewUtil.clear(container2);
    ViewUtil.applyHorizontalBoxLayout(container2);
    container2.add(locationField);
    container2.add(ViewUtil.clear(new JLabel(" = ")));
    container2.add(valueField);
    container2.add(button);

    page.addComponent(container2);
    locationField.setToolTipText("Current display range");

    locationField.setPreferredSize(LOCATION_SIZE);
    locationField.setMinimumSize(LOCATION_SIZE);

    valueField.setPreferredSize(LOCATION_SIZE);
    valueField.setMinimumSize(LOCATION_SIZE);

    page.addComponent(tagContainer);

    page.addComponent(new JScrollPane(ta));

    JButton clear = new JButton("Clear");
    clear.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent ae) {
            variantTags.clear();
            ta.setText("");
            addDefaultTags(variantTags, ta);
        }
    });

    addDefaultTags(variantTags, ta);

    page.addComponent(ViewUtil.alignRight(clear));

    return page;

}

From source file:org.ut.biolab.medsavant.client.variant.ImportVariantsWizard.java

private JPanel populateOnMyComputerPanel(final DefaultWizardPage page) {

    JPanel p = ViewUtil.getClearPanel();
    ViewUtil.applyVerticalBoxLayout(p);/*from  w  w  w.  j  a  va2  s  .  co  m*/

    final JTextField outputFileField = new JTextField();
    ViewUtil.clear(outputFileField);
    outputFileField.setEnabled(false);
    JButton chooseFileButton = new JButton("...");
    chooseFileButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent ae) {
            variantFiles = DialogUtils.chooseFilesForOpen("Import Variants",
                    new ExtensionsFileFilter(new String[] { "vcf", "vcf.gz" }), null);
            if (variantFiles == null || variantFiles.length == 0) {
                page.fireButtonEvent(ButtonEvent.DISABLE_BUTTON, ButtonNames.NEXT);
            } else {
                page.fireButtonEvent(ButtonEvent.ENABLE_BUTTON, ButtonNames.NEXT);
            }
            String path = getPathString(variantFiles);
            outputFileField.setText(path);
            if (variantFiles.length > 0) {
                page.fireButtonEvent(ButtonEvent.ENABLE_BUTTON, ButtonNames.NEXT);
            }
        }

        private String getPathString(File[] files) {
            if (files.length > 1) {
                return files.length + " files";
            } else if (files.length == 1) {
                return files[0].getAbsolutePath();
            } else {
                return "";
            }
        }
    });
    JPanel container = ViewUtil.getClearPanel();
    ViewUtil.applyHorizontalBoxLayout(container);

    container.add(outputFileField);
    container.add(chooseFileButton);

    p.add(ViewUtil.clear(ViewUtil.alignLeft(container)));

    return p;
}

From source file:org.wandora.application.tools.extractors.palvelukartta_v2.PalvelukarttaSelector.java

private void getIdContext(JTextField target) {
    try {//from www . j av  a  2  s  .c  om
        if (context == null)
            return;
        Iterator i = context.getContextObjects();
        if (!i.hasNext())
            return;

        ArrayList<String> ids = new ArrayList<String>();
        while (i.hasNext()) {
            Object o = i.next();
            if (o != null && o instanceof Topic) {
                Topic t = (Topic) o;
                Collection<Locator> sis = t.getSubjectIdentifiers();
                for (Locator si : sis) {
                    if (si == null)
                        continue;
                    boolean atItPanel = (pkTabbedPane.getSelectedComponent().equals(idPanel));
                    String siStr = si.toExternalForm();
                    String id;
                    System.out.println(siStr);
                    if (siStr.startsWith(ORGANIZATION_URL)) {
                        id = siStr.substring(ORGANIZATION_URL.length());
                        if (id != null && id.length() > 0) {
                            ids.add(id);
                            if (atItPanel)
                                organizationIdRadioButton.setSelected(true);
                        }
                    } else if (siStr.startsWith(DEPARTMENT_URL)) {
                        id = siStr.substring(DEPARTMENT_URL.length());
                        if (id != null && id.length() > 0) {
                            ids.add(id);
                            if (atItPanel)
                                departmentIdRadioButton.setSelected(true);
                        }
                    } else if (siStr.startsWith(UNIT_URL)) {
                        id = siStr.substring(UNIT_URL.length());
                        if (id != null && id.length() > 0) {
                            ids.add(id);
                            if (atItPanel)
                                unitIdRadioButton.setSelected(true);
                        }
                    } else if (siStr.startsWith(SERVICE_URL)) {
                        id = siStr.substring(SERVICE_URL.length());
                        if (id != null && id.length() > 0) {
                            ids.add(id);
                            if (atItPanel)
                                serviceIdRadioButton.setSelected(true);
                        }
                    }
                }
            }
        }

        for (String id : ids) {
            System.out.println(id);
        }

        target.setText(StringUtils.join(ids, ","));
    } catch (Exception e) {
        e.printStackTrace();
    }
}

From source file:org.wandora.application.tools.extractors.palvelukartta_v2.PalvelukarttaSelector.java

private void getIdContext(JTextField distField, JTextField latField, JTextField longField) {

    if (context == null || wandora == null)
        return;/*from w  w  w  .  ja v  a2 s  .  c  o m*/
    TopicMap tm = wandora.getTopicMap();
    String locSI = AbstractPalvelukarttaExtractor.PALVELUKARTTA_GEOLOCATION_SI;

    try {
        Topic t = null;
        Topic locType = tm.getTopic(new Locator(locSI));
        Iterator i = context.getContextObjects();
        while (i.hasNext()) {
            Object o = i.next();
            if ((o instanceof Topic))
                t = (Topic) o;
        }

        if (t != null) {
            String loc = t.getData(locType, XTMPSI.LANG_INDEPENDENT);
            String[] coords = StringUtils.split(loc, ",");
            if (coords.length < 2)
                return;
            String latitude = coords[0];
            String longitude = coords[1];
            latField.setText(latitude);
            longField.setText(longitude);
            distField.setText("100");
        }

    } catch (Exception e) {
        e.printStackTrace();
    }

}

From source file:pcgen.gui2.dialog.AboutDialog.java

/**
 * Construct the credits panel. This panel shows basic details
 * about PCGen and lists all involved in it's creation.
 *
 * @return The credits panel.// w w w  .  java  2s .  co  m
 */
private JPanel buildCreditsPanel() {

    JLabel versionLabel = new JLabel();
    JLabel dateLabel = new JLabel();
    JLabel javaVersionLabel = new JLabel();
    JLabel leaderLabel = new JLabel();
    JLabel helperLabel = new JLabel();
    JLabel wwwLink = new JLabel();
    JLabel emailLabel = new JLabel();
    JTextField version = new JTextField();
    JTextField releaseDate = new JTextField();
    JTextField javaVersion = new JTextField();
    JTextField projectLead = new JTextField();
    wwwSite = new JButton();
    mailingList = new JButton();
    JTabbedPane monkeyTabPane = new JTabbedPane();

    JPanel aCreditsPanel = new JPanel();
    aCreditsPanel.setLayout(new GridBagLayout());

    // Labels

    versionLabel.setText(LanguageBundle.getString("in_abt_version")); //$NON-NLS-1$
    GridBagConstraints gridBagConstraints1 = buildConstraints(0, 0, GridBagConstraints.WEST);
    gridBagConstraints1.weightx = 0.2;
    aCreditsPanel.add(versionLabel, gridBagConstraints1);

    dateLabel.setText(LanguageBundle.getString("in_abt_release_date")); //$NON-NLS-1$
    gridBagConstraints1 = buildConstraints(0, 1, GridBagConstraints.WEST);
    aCreditsPanel.add(dateLabel, gridBagConstraints1);

    javaVersionLabel.setText(LanguageBundle.getString("in_abt_java_version")); //$NON-NLS-1$
    gridBagConstraints1 = buildConstraints(0, 2, GridBagConstraints.WEST);
    aCreditsPanel.add(javaVersionLabel, gridBagConstraints1);

    leaderLabel.setText(LanguageBundle.getString("in_abt_BD")); //$NON-NLS-1$
    gridBagConstraints1 = buildConstraints(0, 3, GridBagConstraints.WEST);
    aCreditsPanel.add(leaderLabel, gridBagConstraints1);

    wwwLink.setText(LanguageBundle.getString("in_abt_web")); //$NON-NLS-1$
    gridBagConstraints1 = buildConstraints(0, 4, GridBagConstraints.WEST);
    aCreditsPanel.add(wwwLink, gridBagConstraints1);

    emailLabel.setText(LanguageBundle.getString("in_abt_email")); //$NON-NLS-1$
    gridBagConstraints1 = buildConstraints(0, 5, GridBagConstraints.WEST);
    aCreditsPanel.add(emailLabel, gridBagConstraints1);

    helperLabel.setText(LanguageBundle.getString("in_abt_monkeys")); //$NON-NLS-1$
    gridBagConstraints1 = buildConstraints(0, 6, GridBagConstraints.NORTHWEST);
    aCreditsPanel.add(helperLabel, gridBagConstraints1);

    // Info

    version.setEditable(false);
    String versionNum = PCGenPropBundle.getVersionNumber();
    if (StringUtils.isNotBlank(PCGenPropBundle.getAutobuildNumber())) {
        versionNum += " autobuild #" + PCGenPropBundle.getAutobuildNumber();
    }
    version.setText(versionNum);
    version.setBorder(null);
    version.setOpaque(false);

    gridBagConstraints1 = buildConstraints(1, 0, GridBagConstraints.WEST);
    gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints1.weightx = 1.0;
    aCreditsPanel.add(version, gridBagConstraints1);

    releaseDate.setEditable(false);
    String releaseDateStr = PCGenPropBundle.getReleaseDate();
    if (StringUtils.isNotBlank(PCGenPropBundle.getAutobuildDate())) {
        releaseDateStr = PCGenPropBundle.getAutobuildDate();
    }
    releaseDate.setText(releaseDateStr);
    releaseDate.setBorder(new EmptyBorder(new Insets(1, 1, 1, 1)));
    releaseDate.setOpaque(false);

    gridBagConstraints1 = buildConstraints(1, 1, GridBagConstraints.WEST);
    gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
    aCreditsPanel.add(releaseDate, gridBagConstraints1);

    javaVersion.setEditable(false);
    javaVersion.setText(
            System.getProperty("java.runtime.version") + " (" + System.getProperty("java.vm.vendor") + ")");
    javaVersion.setBorder(new EmptyBorder(new Insets(1, 1, 1, 1)));
    javaVersion.setOpaque(false);

    gridBagConstraints1 = buildConstraints(1, 2, GridBagConstraints.WEST);
    gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
    aCreditsPanel.add(javaVersion, gridBagConstraints1);

    projectLead.setEditable(false);
    projectLead.setText(PCGenPropBundle.getHeadCodeMonkey());
    projectLead.setBorder(new EmptyBorder(new Insets(1, 1, 1, 1)));
    projectLead.setOpaque(false);

    gridBagConstraints1 = buildConstraints(1, 3, GridBagConstraints.WEST);
    gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
    aCreditsPanel.add(projectLead, gridBagConstraints1);

    // Web site button
    wwwSite.setText(PCGenPropBundle.getWWWHome());
    wwwSite.addActionListener(event -> {
        try {
            DesktopBrowserLauncher.viewInBrowser(new URL(wwwSite.getText()));
        } catch (IOException ioe) {
            Logging.errorPrint(LanguageBundle.getString("in_abt_browser_err"), ioe); //$NON-NLS-1$
        }
    });
    gridBagConstraints1 = buildConstraints(1, 4, GridBagConstraints.WEST);
    aCreditsPanel.add(wwwSite, gridBagConstraints1);

    // Mailing list button
    mailingList.setText(PCGenPropBundle.getMailingList());
    mailingList.addActionListener(event -> {
        try {
            DesktopBrowserLauncher.viewInBrowser(new URL(mailingList.getText()));
        } catch (IOException ioe) {
            Logging.errorPrint(LanguageBundle.getString("in_err_browser_err"), ioe); //$NON-NLS-1$
        }
    });
    gridBagConstraints1 = buildConstraints(1, 5, GridBagConstraints.WEST);
    aCreditsPanel.add(mailingList, gridBagConstraints1);

    // Monkey tabbed pane
    gridBagConstraints1 = buildConstraints(1, 6, GridBagConstraints.WEST);
    gridBagConstraints1.gridwidth = 2;
    gridBagConstraints1.weighty = 1.0;
    gridBagConstraints1.fill = GridBagConstraints.BOTH;
    aCreditsPanel.add(monkeyTabPane, gridBagConstraints1);

    monkeyTabPane.add(LanguageBundle.getString("in_abt_code_mky"), //$NON-NLS-1$
            buildMonkeyList(PCGenPropBundle.getCodeMonkeys()));
    monkeyTabPane.add(LanguageBundle.getString("in_abt_list_mky"), //$NON-NLS-1$
            buildMonkeyList(PCGenPropBundle.getListMonkeys()));
    monkeyTabPane.add(LanguageBundle.getString("in_abt_test_mky"), //$NON-NLS-1$
            buildMonkeyList(PCGenPropBundle.getTestMonkeys()));
    monkeyTabPane.add(LanguageBundle.getString("in_abt_eng_mky"), //$NON-NLS-1$
            buildMonkeyList(PCGenPropBundle.getEngineeringMonkeys()));

    // because there isn't one
    monkeyTabPane.setToolTipTextAt(2, LanguageBundle.getString("in_abt_easter_egg")); //$NON-NLS-1$

    return aCreditsPanel;
}