private JPanel makeBrowseButtonBox() { JPanel buttonBox = new JPanel(); buttonBox.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); buttonBox.setLayout(new GridBagLayout()); browseButton = new JButton("Browse Trees"); browseButton.addActionListener(this); JLabel sizeLabel = new JLabel("Tree size:"); JSlider fontSlider = new JSlider(2, 64, 12); fontSlider.addChangeListener(this); GridBagConstraints buttonConstraints = new GridBagConstraints(); buttonConstraints.fill = GridBagConstraints.HORIZONTAL; buttonConstraints.weightx = 0.2; buttonConstraints.weighty = 0.2; buttonBox.add(browseButton,buttonConstraints); buttonConstraints.weightx = 0.6; buttonBox.add(fontSlider, buttonConstraints); buttonConstraints.weightx = 0.2; buttonBox.add(sizeLabel, buttonConstraints); return buttonBox; }
((JSpinner.DefaultEditor)((JSpinner)component).getEditor()).getTextField().setColumns(4); JPanel descriptionPanel = new JPanel(); descriptionPanel.setLayout(new GridBagLayout()); getContentPane().add( descriptionPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); descriptionPanel.setBackground(Color.white); descriptionPanel.add(descriptionText, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0)); descriptionText.setWrapStyleWord(true); descriptionText.setLineWrap(true); getContentPane().add( panel, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0)); panel.add(new JLabel(name + ":")); getContentPane().add( buttonPanel, new GridBagConstraints(0, 2, 2, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, JButton cancelButton = new JButton("Cancel");
private void initializeComponents () { getContentPane().setLayout(new GridBagLayout()); JPanel leftSidePanel = new JPanel(); leftSidePanel.setLayout(new GridBagLayout()); getContentPane().add(leftSidePanel, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); JPanel fontPanel = new JPanel(); leftSidePanel.add(fontPanel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0)); fontPanel.setLayout(new GridBagLayout()); fontPanel.add(fontSizeSpinner, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, fontPanel.add(fontScroll, new GridBagConstraints(1, 1, 3, 1, 1.0, 1.0, GridBagConstraints.CENTER, fontPanel.add(systemFontRadio, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHEAST, fontPanel.add(fontFileRadio, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, fontPanel.add(fontFileText, new GridBagConstraints(1, 2, 2, 1, 1.0, 0.0, GridBagConstraints.CENTER, fontPanel.add(new JLabel("Size:"), new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, fontPanel.add(unicodePanel, new GridBagConstraints(2, 3, 2, 1, 0.0, 0.0, GridBagConstraints.EAST, unicodePanel.add(boldCheckBox, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, unicodePanel.add(italicCheckBox, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST,
effectsList.getListSelectionListeners()[0].valueChanged(null); setLayout(new GridBagLayout()); setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, java.awt.Color.black)); appliedEffectsPanel.add(this, constrains); JPanel titlePanel = new JPanel(); titlePanel.setLayout(new LayoutManager() { public void removeLayoutComponent (Component comp) { upButton = new JButton(); titlePanel.add(upButton); upButton.setText("Up"); upButton.setMargin(new Insets(0, 0, 0, 0)); downButton.setMargin(new Insets(0, 0, 0, 0)); deleteButton.setMargin(new Insets(0, 0, 0, 0)); nameLabel = new JLabel(effect.toString()); titlePanel.add(nameLabel); Font font = nameLabel.getFont(); nameLabel.setFont(new Font(font.getName(), Font.BOLD, font.getSize())); add(titlePanel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, valuesPanel.setLayout(new GridBagLayout()); add(valuesPanel, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
protected void initializeComponents () { setLayout(new GridBagLayout()); titlePanel = new JPanel(new GridBagLayout()); add(titlePanel, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(3, 0, 3, 0), 0, 0)); titlePanel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); nameLabel = new JLabel(name); titlePanel.add(nameLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(3, 6, 3, 6), 0, 0)); nameLabel.setFont(nameLabel.getFont().deriveFont(Font.BOLD)); titlePanel.add(descriptionLabel, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, titlePanel.add(advancedButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, titlePanel.add(activeButton, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, removeButton = new JButton("X"); titlePanel.add(removeButton, new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, add(contentPanel, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, add(advancedPanel, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, removeButton.addActionListener(new ActionListener() { public void actionPerformed (ActionEvent event) { removePanel();
Panel logoPanel = new Panel(); ImageIcon logoIcon = ImageHelper.loadImageIcon(LocalisationHelper.getString("about_dialog_image")); JLabel la_icon = new JLabel(logoIcon); la_icon.setBorder(new SoftBevelBorder(SoftBevelBorder.LOWERED)); logoPanel.add(la_icon); JPanel versionPanel = new JPanel(); versionPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); versionPanel.setLayout(new GridBagLayout()); JLabel copyright = new JLabel("\u00A9" + " 2011-2018: Joerg Wuethrich and contributors", JLabel.CENTER); GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.anchor = GridBagConstraints.NORTH; gridBagConstraints.fill = GridBagConstraints.VERTICAL; Insets insetsGapOnTop = new Insets(10, 0, 0, 0); GridBagConstraints gridBagConstraintsGapOnTop = new GridBagConstraints(); gridBagConstraintsGapOnTop.gridy = 1; gridBagConstraintsGapOnTop.insets = insetsGapOnTop; getContentPane().add("North", logoPanel); getContentPane().add("Center", versionPanel); getContentPane().add("South", buttonPanel); pack(); setResizable(false);
panelOutput.setLayout(new GridBagLayout()); GridBagConstraints gc1 = new GridBagConstraints(); gc1.fill = GridBagConstraints.BOTH; gc1.gridx = 0; gc1.weightx = 0.975f; gc1.weighty = 0.5f; GridBagConstraints gcBtn1 = new GridBagConstraints(); gcBtn1.fill = GridBagConstraints.BOTH; gcBtn1.gridx = 1; gcBtn1.weightx = 0.025f; gcBtn1.weighty = 0.5f; GridBagConstraints gc2 = new GridBagConstraints(); gc2.fill = GridBagConstraints.BOTH; gc2.gridx = 0; gc2.weightx = 0.975f; gc2.weighty = 0.5f; GridBagConstraints gcBtn2 = new GridBagConstraints(); gcBtn2.fill = GridBagConstraints.BOTH; gcBtn2.gridx = 1; gcBtn2.weightx = 0.025f; gcBtn2.weighty = 0.5f; GridBagConstraints export = new GridBagConstraints(); export.fill = GridBagConstraints.BOTH; export.gridheight = 2;
getContentPane().add(splitPane, BorderLayout.CENTER); JPanel propertiesPanel = new JPanel(new GridBagLayout()); rightSplit.add(propertiesPanel, JSplitPane.TOP); propertiesPanel.setBorder(new CompoundBorder(BorderFactory.createEmptyBorder(3, 0, 6, 6), BorderFactory .createTitledBorder("Editor Properties"))); propertiesPanel.add(scroll, new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.NORTH, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); scroll.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); editorPropertiesPanel = new JPanel(new GridBagLayout()); scroll.setViewportView(editorPropertiesPanel); scroll.getVerticalScrollBar().setUnitIncrement(70); propertiesPanel.add(scroll, new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.NORTH, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); scroll.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); influencersPanel.add(influencerBox, new GridBagConstraints(0, 0, 1, 1, 0, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); influencersPanel.add(addInfluencerButton, new GridBagConstraints(1, 0, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); scroll.setViewportView(influencersPanel); propertiesPanel.add(scroll, new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.NORTH, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); scroll.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
private void initializeComponents () { JPanel contentPanel = getContentPanel(); { JLabel label = new JLabel("Value:"); contentPanel.add(label, new GridBagConstraints(0, 1, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 6), 0, 0)); } { valueSpinner = new JSpinner(new SpinnerNumberModel(new Float(0), new Float(-99999), new Float(99999), new Float(0.1f))); contentPanel.add(valueSpinner, new GridBagConstraints(1, 1, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); } } }
JPanel panel = new JPanel(); panel.add(new JLabel("Global"), new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); panel.add(isGlobalCheckBox = new JCheckBox(), new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); contentPanel.add(panel,new GridBagConstraints(0, 1, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); contentPanel.add( magnitudePanel = new ScaledNumericPanel(editor, null, charTitle, "Strength", "In world units per second.", true), new GridBagConstraints(0, 2, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 6), 0, 0)); JPanel spacer = new JPanel(); spacer.setPreferredSize(new Dimension()); contentPanel.add(spacer, new GridBagConstraints(6, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
private void uiLayout () { topPanel = new JPanel(new GridBagLayout()); topPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); warningNotice = new JLabel("List of third party extensions for LibGDX"); warningNotice2 = new JLabel("These are not maintained by the LibGDX team, please see the support links for info and help"); warningNotice.setHorizontalAlignment(JLabel.CENTER); warningNotice2.setHorizontalAlignment(JLabel.CENTER); topPanel.add(warningNotice, new GridBagConstraints(0, 0, 1, 1, 1, 0, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); topPanel.add(warningNotice2, new GridBagConstraints(0, 1, 1, 1, 1, 0, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); separator.setBackground(new Color(85, 85, 85)); topPanel.add(separator, new GridBagConstraints(0, 2, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); bottomPanel = new JPanel(new GridBagLayout()); buttonPanel = new JPanel(new GridBagLayout()); buttonOK = new SetupButton("Save"); buttonCancel = new SetupButton("Cancel"); buttonPanel.add(buttonOK, new GridBagConstraints(0, 0, 1, 1, 0, 0, CENTER, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); buttonPanel.add(buttonCancel, new GridBagConstraints(1, 0, 1, 1, 0, 0, CENTER, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); bottomPanel.add(buttonPanel, new GridBagConstraints(3, 0, 1, 1, 1, 1, SOUTHEAST, NONE, new Insets(0, 0, 0, 0), 0, 0)); contentPane.add(topPanel, new GridBagConstraints(0, 0, 1, 1, 1, 0.1, NORTH, BOTH, new Insets(0, 0, 0, 0), 0, 0)); contentPane.add(scrollPane, new GridBagConstraints(0, 1, 1, 1, 1, 1, NORTH, BOTH, new Insets(0, 0, 0, 0), 0, 0)); contentPane.add(bottomPanel, new GridBagConstraints(0, 2, 1, 1, 1, 0, SOUTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
titlePanel = new JPanel(new GridBagLayout()); add(titlePanel, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(3, 0, 3, 0), 0, 0)); titlePanel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); JLabel label = new JLabel(name); titlePanel.add(label, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(3, 6, 3, 6), 0, 0)); label.setFont(label.getFont().deriveFont(Font.BOLD)); descriptionLabel = new JLabel(description); titlePanel.add(descriptionLabel, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(3, 6, 3, 6), 0, 0)); titlePanel.add(advancedButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 6), 0, 0)); advancedButton.setVisible(false); titlePanel.add(activeButton, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 6), 0, 0)); contentPanel = new JPanel(new GridBagLayout()); add(contentPanel, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 6, 6, 6), 0, 0)); contentPanel.setVisible(false); advancedPanel = new JPanel(new GridBagLayout()); add(advancedPanel, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 6, 6, 6), 0, 0));
private void initializeComponents () { JPanel contentPanel = getContentPanel(); { label = new JLabel("Value:"); contentPanel.add(label, new GridBagConstraints(2, 2, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 6), 0, 0)); } { minSlider = new Slider(0, -99999, 99999, 1, -400, 400); contentPanel.add(minSlider, new GridBagConstraints(3, 2, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); } { maxSlider = new Slider(0, -99999, 99999, 1, -400, 400); contentPanel.add(maxSlider, new GridBagConstraints(4, 2, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 6, 0, 0), 0, 0)); } { rangeButton = new JButton("<"); rangeButton.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); contentPanel.add(rangeButton, new GridBagConstraints(5, 2, 1, 1, 1.0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 1, 0, 0), 0, 0)); } } }
getContentPane().add(splitPane, BorderLayout.CENTER); JPanel propertiesPanel = new JPanel(new GridBagLayout()); rightSplit.add(propertiesPanel, JSplitPane.TOP); propertiesPanel.setBorder(new CompoundBorder(BorderFactory.createEmptyBorder(3, 0, 6, 6), BorderFactory .createTitledBorder("Editor Properties"))); propertiesPanel.add(scroll, new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.NORTH, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); scroll.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); editRowsPanel = new JPanel(new GridBagLayout()); scroll.setViewportView(editRowsPanel); scroll.getVerticalScrollBar().setUnitIncrement(70); propertiesPanel.add(scroll, new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.NORTH, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); scroll.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
GridBagLayout gridBag = new GridBagLayout(); GridBagConstraints constraints; Insets insets; insets = new Insets(12, 12, 0, 0); // top, left, bottom, right constraints = new GridBagConstraints( 0, 0, 1, 1, // x, y, width, height 0.0, 0.0, // weightx, weighty gridBag.setConstraints(filenameLabel, constraints); contentPane.add(filenameLabel); insets = new Insets(12, 7, 0, 12); // top, left, bottom, right constraints = new GridBagConstraints( 1, 0, 1, 1, // x, y, width, height 1.0, 1.0, // weightx, weighty gridBag.setConstraints(filename, constraints); contentPane.add(filename); insets = new Insets(0, 12, 12, 12); // top, left, bottom, right constraints = new GridBagConstraints( 0, 2, 2, 1, // x, y, width, height 1.0, 1.0, // weightx, weighty
private static final Insets WEST_INSETS = new Insets(5, 0, 5, 5); private static final Insets EAST_INSETS = new Insets(5, 5, 5, 0); private Map<FieldTitle, JTextField> fieldMap = new HashMap<FieldTitle, JTextField>(); setLayout(new GridBagLayout()); setBorder(BorderFactory.createCompoundBorder( BorderFactory.createTitledBorder("Player Editor"), FieldTitle fieldTitle = FieldTitle.values()[i]; gbc = createGbc(0, i); add(new JLabel(fieldTitle.getTitle() + ":", JLabel.LEFT), gbc); gbc = createGbc(1, i); JTextField textField = new JTextField(10); add(textField, gbc); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = x; gbc.gridy = y;
void addEditorRow (JPanel row) { row.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, java.awt.Color.black)); editRowsPanel.add(row, new GridBagConstraints(0, -1, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); }
public void addValue (final Value value) { JLabel valueNameLabel = new JLabel(value.getName() + ":"); valuesPanel.add(valueNameLabel, new GridBagConstraints(0, -1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0)); final JLabel valueValueLabel = new JLabel(); valuesPanel.add(valueValueLabel, new GridBagConstraints(1, -1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0)); valueValueLabel.setOpaque(true); if (value.getObject() instanceof java.awt.Color) valueValueLabel.setIcon(getColorIcon((java.awt.Color)value.getObject())); else valueValueLabel.setText(value.toString()); valueValueLabel.addMouseListener(new MouseAdapter() { public void mouseEntered (MouseEvent evt) { valueValueLabel.setBackground(selectedColor); } public void mouseExited (MouseEvent evt) { valueValueLabel.setBackground(null); } public void mouseClicked (MouseEvent evt) { Object oldObject = value.getObject(); value.showDialog(); if (!value.getObject().equals(oldObject)) { effect.setValues(values); updateValues(); updateFont(); } } }); }
public static void main(String[] args) { JFrame frame = new JFrame(); frame.setLayout(new GridBagLayout()); JPanel panel = new JPanel(); panel.add(new JLabel("This is a label")); panel.setBorder(new LineBorder(Color.BLACK)); // make it easy to see frame.add(panel, new GridBagConstraints()); frame.setSize(400, 400); frame.setLocationRelativeTo(null); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); }
recentTregexPatterns.addActionListener(this); JLabel recentLabel = new JLabel("Recent: "); JLabel patternLabel = new JLabel("Pattern: "); tregexPattern = new JTextArea(); tregexPattern.setFocusTraversalKeysEnabled(true); JPanel tregexInput = new JPanel(); tregexInput.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; c.weightx = 1.0; c.gridx = 0; c.gridy = 0; tregexInput.add(recentLabel, c); c.weightx = 12.0; c.gridwidth = GridBagConstraints.REMAINDER;