Ignore:
Timestamp:
2012-09-01T22:16:27+02:00 (12 years ago)
Author:
Don-vip
Message:

see #8011 - Small improvements in About dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AboutAction.java

    r5194 r5493  
    2020import org.openstreetmap.josm.Main;
    2121import org.openstreetmap.josm.data.Version;
     22import org.openstreetmap.josm.gui.util.GuiHelper;
    2223import org.openstreetmap.josm.plugins.PluginHandler;
    2324import org.openstreetmap.josm.tools.GBC;
     
    4344
    4445    public void actionPerformed(ActionEvent e) {
    45         JTabbedPane about = new JTabbedPane();
     46        final JTabbedPane about = new JTabbedPane();
    4647
    4748        Version version = Version.getInstance();
     
    9192        about.addTab(tr("Plugins"), new JScrollPane(PluginHandler.getInfoPanel()));
    9293
    93         about.setPreferredSize(new Dimension(500,300));
    94 
    95         JOptionPane.showMessageDialog(Main.parent, about, tr("About JOSM..."),
     94        // Intermediate panel to allow proper optionPane resizing
     95        JPanel panel = new JPanel(new GridBagLayout());
     96        panel.setPreferredSize(new Dimension(600, 300));
     97        panel.add(about, GBC.std().fill());
     98       
     99        GuiHelper.prepareResizeableOptionPane(panel, panel.getPreferredSize());
     100        JOptionPane.showMessageDialog(Main.parent, panel, tr("About JOSM..."),
    96101                JOptionPane.INFORMATION_MESSAGE, ImageProvider.get("logo"));
    97102    }
Note: See TracChangeset for help on using the changeset viewer.