import javax.swing.ListCellRenderer;
import javax.swing.SpringLayout;
import javax.swing.SwingConstants;
+import javax.swing.SwingUtilities;
+import javax.swing.border.TitledBorder;
import javax.swing.filechooser.FileFilter;
import javax.swing.plaf.basic.BasicFileChooserUI;
list = new JList<>(recent);
list.setCellRenderer(new recentlyOpenedCellRenderer());
- /*
- DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
- dlcr.setHorizontalAlignment(DefaultListCellRenderer.RIGHT);
- list.setCellRenderer(dlcr);
- */
-
list.addMouseListener(new MouseAdapter()
{
@Override
}
});
- this.setBorder(new javax.swing.border.TitledBorder(
- MessageManager.getString("label.recently_opened")));
+ TitledBorder recentlyOpenedBorder = new TitledBorder(
+ MessageManager.getString("label.recently_opened"));
+ recentlyOpenedBorder.setTitleFont(
+ recentlyOpenedBorder.getTitleFont().deriveFont(10f));
+ this.setBorder(recentlyOpenedBorder);
final JScrollPane scroller = new JScrollPane(list);
layout.putConstraint(SpringLayout.NORTH, scroller, 5,
SpringLayout.NORTH, this);
- // TODO are we now all using FlatLaf -- check same dimensions for
- // everyone?
- if (Platform.isAMacAndNotJS())
- {
- scroller.setPreferredSize(new Dimension(280, 100));
- }
- else
- {
- scroller.setPreferredSize(new Dimension(500, 200));
- }
-
+ // one size okay for all
+ scroller.setPreferredSize(new Dimension(280, 105));
this.add(scroller);
- javax.swing.SwingUtilities.invokeLater(new Runnable()
+ SwingUtilities.invokeLater(new Runnable()
{
@Override
public void run()