Index: src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(revision 17084)
+++ src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(working copy)
@@ -58,6 +58,7 @@
         // set the maximum width to the current screen. If the dialog is opened on a
         // smaller screen than before, this will reset the stored preference.
         this.setMaximumSize(GuiHelper.getScreenSize());
+        pack();
     }
 
     protected JPanel buildActionPanel() {
@@ -229,6 +230,7 @@
     public void dispose() {
         previouslySelected = tpPreferences.getSelectedTab();
         removeWindowListener(windowEventHandler);
+        setVisible(false); // save current geometry
         super.dispose();
     }
 }
