Ticket #1607: LafPreference.diff

File LafPreference.diff, 1.7 KB (added by Henry Loenwind, 16 years ago)
  • src/org/openstreetmap/josm/gui/preferences/LafPreference.java

     
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
    66import java.awt.Component;
     7import java.awt.GridBagLayout;
    78import java.lang.reflect.*;
    89
    910import javax.swing.DefaultListCellRenderer;
    1011import javax.swing.JComboBox;
    1112import javax.swing.JLabel;
    1213import javax.swing.JList;
     14import javax.swing.JPanel;
     15import javax.swing.JScrollPane;
    1316import javax.swing.ListCellRenderer;
    1417import javax.swing.UIManager;
    1518import javax.swing.UIManager.LookAndFeelInfo;
     19import javax.swing.BorderFactory;
     20import javax.swing.Box;
    1621
    1722import org.openstreetmap.josm.Main;
    1823import org.openstreetmap.josm.tools.GBC;
     
    4261                });
    4362                lafCombo.addActionListener(gui.requireRestartAction);
    4463
    45                 gui.display.add(new JLabel(tr("Look and Feel")), GBC.std());
    46                 gui.display.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
    47                 gui.display.add(lafCombo, GBC.eol().fill(GBC.HORIZONTAL));
     64                JPanel panel = new JPanel(new GridBagLayout());
     65                panel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
     66                panel.add(new JLabel(tr("Look and Feel")), GBC.std());
     67                panel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
     68                panel.add(lafCombo, GBC.eol().fill(GBC.HORIZONTAL));
     69                panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
     70                JScrollPane scrollpane = new JScrollPane(panel);
     71                scrollpane.setBorder(BorderFactory.createEmptyBorder( 0, 0, 0, 0 ));
     72                gui.displaycontent.addTab(tr("Look and Feel"), scrollpane);
    4873        }
    4974
    5075        public void ok() {