Index: /trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java	(revision 1190)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java	(revision 1191)
@@ -6,6 +6,8 @@
 
 import java.awt.Dimension;
-import java.awt.Graphics;
+import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.Rectangle;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -28,9 +30,8 @@
 import javax.swing.AbstractAction;
 import javax.swing.BorderFactory;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
 import javax.swing.DefaultListModel;
 import javax.swing.JButton;
 import javax.swing.JCheckBox;
+import javax.swing.JEditorPane;
 import javax.swing.JLabel;
 import javax.swing.JList;
@@ -38,4 +39,9 @@
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
+import javax.swing.Scrollable;
+import javax.swing.UIManager;
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.event.HyperlinkListener;
+import javax.swing.event.HyperlinkEvent.EventType;
 
 import org.openstreetmap.josm.Main;
@@ -45,4 +51,5 @@
 import org.openstreetmap.josm.plugins.PluginProxy;
 import org.openstreetmap.josm.tools.GBC;
+import org.openstreetmap.josm.tools.OpenBrowser;
 import org.openstreetmap.josm.tools.XmlObjectParser.Uniform;
 
@@ -82,32 +89,12 @@
     private Map<String, PluginDescription> availablePlugins;
     private JPanel plugin;
-    private class MyBox extends Box {
-        int lastwidth;
-        int offset = 40;
-        public MyBox()
-        {
-            super(BoxLayout.Y_AXIS);
-        }
-        public int myGetWidth()
-        {
-            int w = plugin.getWidth()-offset;
-            if(w <= 0) w = 450;
-            lastwidth = w;
-            return w;
-        }
-        public void paint(Graphics g)
-        {
-            if(lastwidth != plugin.getWidth()-offset)
-                refreshPluginPanel(gui);
-            super.paint(g);
-        }
-    }
-    private MyBox pluginPanel = new MyBox();
+    private JPanel pluginPanel = new NoHorizontalScrollPanel(new GridBagLayout());
     private PreferenceDialog gui;
+    private JScrollPane pluginPane;
 
     public void addGui(final PreferenceDialog gui) {
         this.gui = gui;
         plugin = gui.createPreferenceTab("plugin", tr("Plugins"), tr("Configure available plugins."), false);
-        JScrollPane pluginPane = new JScrollPane(pluginPanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+        pluginPane = new JScrollPane(pluginPanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
         pluginPane.setBorder(null);
         plugin.add(pluginPane, GBC.eol().fill(GBC.BOTH));
@@ -239,6 +226,10 @@
 
         pluginPanel.removeAll();
-        int width = pluginPanel.myGetWidth();
-
+
+        GridBagConstraints gbc = new GridBagConstraints();
+        gbc.gridx = 0;
+        gbc.anchor = GridBagConstraints.NORTHWEST;
+
+        int row = 0;
         for (final PluginDescription plugin : availablePlugins.values()) {
             boolean enabled = (enabledPlugins != null) && enabledPlugins.contains(plugin.name);
@@ -264,12 +255,33 @@
                     tr("{0}: Version {1}{2}", plugin.name, remoteversion, localversion),
                     pluginMap.get(plugin.name));
-            pluginPanel.add(pluginCheck);
-
-            pluginCheck.setToolTipText(plugin.resource != null ? "" + plugin.resource : tr("Plugin bundled with JOSM"));
-            JLabel label = new JLabel("<html><i>" + (plugin.description == null ? tr("no description available") : plugin.description) + "</i></html>");
-            label.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
-            label.setMaximumSize(new Dimension(width, 1000));
-            pluginPanel.add(label);
-            pluginPanel.add(Box.createVerticalStrut(5));
+            gbc.gridy = row++;
+            gbc.insets = new Insets(5,5,0,5);
+            gbc.weighty = 0.1;
+            gbc.fill = GridBagConstraints.NONE;
+            pluginPanel.add(pluginCheck, gbc);
+
+            pluginCheck.setToolTipText(plugin.resource != null ? ""+plugin.resource : tr("Plugin bundled with JOSM"));
+
+            JEditorPane description = new JEditorPane();
+            description.setContentType("text/html");
+            description.setEditable(false);
+            description.setText("<html><i>"+(plugin.description==null?tr("no description available"):plugin.description)+"</i></html>");
+            description.setBorder(BorderFactory.createEmptyBorder(0,20,0,0));
+            description.setBackground(UIManager.getColor("Panel.background"));
+            description.addHyperlinkListener(new HyperlinkListener() {
+                public void hyperlinkUpdate(HyperlinkEvent e) {
+                    if(e.getEventType() == EventType.ACTIVATED) {
+                        OpenBrowser.displayUrl(e.getURL().toString());
+                    }
+                }
+            });
+
+            gbc.gridy = row++;
+            gbc.insets = new Insets(3,5,5,5);
+            gbc.weighty = 0.9;
+            gbc.weightx = 1.0;
+            gbc.anchor = GridBagConstraints.WEST;
+            gbc.fill = GridBagConstraints.HORIZONTAL;
+            pluginPanel.add(description, gbc);
 
             pluginCheck.addActionListener(new ActionListener(){
@@ -382,3 +394,29 @@
         return Main.pref.putCollection("plugins", plugins);
     }
+    
+    class NoHorizontalScrollPanel extends JPanel implements Scrollable {
+        public NoHorizontalScrollPanel(GridBagLayout gridBagLayout) {
+            super(gridBagLayout);
+        }
+
+        public Dimension getPreferredScrollableViewportSize() {
+            return super.getPreferredSize();
+        }
+
+        public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) {
+            return 30;
+        }
+
+        public boolean getScrollableTracksViewportHeight() {
+            return false;
+        }
+
+        public boolean getScrollableTracksViewportWidth() {
+            return true;
+        }
+
+        public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) {
+            return 10;
+        }
+    }
 }
