Index: trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 1659)
+++ trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 1661)
@@ -30,5 +30,5 @@
 
     // For easy access when inherited
-    protected Object contentConstraints = GBC.eol().anchor(GBC.CENTER).insets(5,10,5,0);
+    protected Object contentConstraints = GBC.eol().anchor(GBC.CENTER).fill(GBC.HORIZONTAL).insets(5,10,5,0);
     protected ArrayList<JButton> buttons = new ArrayList<JButton>();
 
@@ -175,4 +175,8 @@
         Action actionListener = new AbstractAction() {
             public void actionPerformed(ActionEvent actionEvent) {
+                // 0 means that the dialog has been closed otherwise.
+                // We need to set it to zero again, in case the dialog has been re-used
+                // and the result differs from its default value
+                result = 0;
                 setVisible(false);
             }
