Index: trunk/src/org/openstreetmap/josm/gui/MapFrame.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 2268)
+++ trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 2269)
@@ -78,5 +78,5 @@
      */
     private List<ToggleDialog> allDialogs = new ArrayList<ToggleDialog>();
-    private DialogsPanel dialogsPanel = new DialogsPanel();
+    private DialogsPanel dialogsPanel;
 
     public final ButtonGroup toolGroup = new ButtonGroup();
@@ -108,6 +108,8 @@
         toolGroup.setSelected(((AbstractButton)toolBarActions.getComponent(0)).getModel(), true);
 
-        JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true,
-                             mapView, dialogsPanel);
+        JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true);
+        dialogsPanel = new DialogsPanel(splitPane);
+        splitPane.setLeftComponent(mapView);
+        splitPane.setRightComponent(dialogsPanel);
 
         /**
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java	(revision 2268)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java	(revision 2269)
@@ -12,4 +12,5 @@
 import javax.swing.BoxLayout;
 import javax.swing.JPanel;
+import javax.swing.JSplitPane;
 
 import org.openstreetmap.josm.gui.MultiSplitLayout;
@@ -30,4 +31,9 @@
      */
     private List<JPanel> panels = new ArrayList<JPanel>();
+    
+    final private JSplitPane parent;
+    public DialogsPanel(JSplitPane parent) {
+        this.parent = parent;
+    }
 
     private boolean initialized = false;
@@ -259,4 +265,18 @@
         mSpltPane.getMultiSplitLayout().setFloatingDividers(true);
         mSpltPane.revalidate();
+
+        /**
+         * Hide the Panel, if there is nothing to show
+         */
+        if (numPanels == 1 && panels.get(N-1).getComponents().length == 0)
+        {
+            this.setVisible(false);
+        } else {
+            if (this.getWidth() != 0) { // only if josm started with hidden panel
+                this.setPreferredSize(new Dimension(this.getWidth(), 0));
+            }
+            this.setVisible(true);
+            parent.resetToPreferredSizes();
+        }
     }
 
