Index: trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java	(revision 2386)
+++ trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java	(revision 2387)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.gui;
 
+import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
@@ -36,6 +37,11 @@
      */
     public static void explainOsmApiInitializationException(OsmApiInitializationException e) {
-        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainOsmApiInitializationException(e), tr("Error"),
-                JOptionPane.ERROR_MESSAGE);
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainOsmApiInitializationException(e),
+                tr("Error"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#OsmApiInitializationException")
+        );
     }
 
@@ -46,6 +52,11 @@
      */
     public static void explainOsmChangesetCloseException(OsmChangesetCloseException e) {
-        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainOsmChangesetCloseException(e), tr("Error"),
-                JOptionPane.ERROR_MESSAGE);
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainOsmChangesetCloseException(e),
+                tr("Error"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#OsmChangesetCloseException")
+        );
     }
 
@@ -56,6 +67,11 @@
      */
     public static void explainPreconditionFailed(OsmApiException e) {
-        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainPreconditionFailed(e),
-                tr("Precondition violation"), JOptionPane.ERROR_MESSAGE);
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainPreconditionFailed(e),
+                tr("Precondition violation"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#OsmApiException")
+        );
     }
 
@@ -66,6 +82,11 @@
      */
     public static void explainGeneric(Exception e) {
-        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainGeneric(e), tr("Error"),
-                JOptionPane.ERROR_MESSAGE);
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainGeneric(e),
+                tr("Error"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#GenericException")
+        );
     }
 
@@ -79,6 +100,11 @@
 
     public static void explainSecurityException(OsmTransferException e) {
-        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainSecurityException(e), tr("Security exception"),
-                JOptionPane.ERROR_MESSAGE);
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainSecurityException(e),
+                tr("Security exception"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#SecurityException")
+        );
     }
 
@@ -92,6 +118,11 @@
 
     public static void explainNestedSocketException(OsmTransferException e) {
-        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainNestedSocketException(e),
-                tr("Network exception"), JOptionPane.ERROR_MESSAGE);
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainNestedSocketException(e),
+                tr("Network exception"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#NestedSocketException")
+        );
     }
 
@@ -105,6 +136,11 @@
 
     public static void explainNestedIOException(OsmTransferException e) {
-        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainNestedIOException(e), tr("IO Exception"),
-                JOptionPane.ERROR_MESSAGE);
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainNestedIOException(e),
+                tr("IO Exception"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#NestedIOException")
+        );
     }
 
@@ -117,6 +153,11 @@
 
     public static void explainInternalServerError(OsmTransferException e) {
-        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainInternalServerError(e),
-                tr("Internal Server Error"), JOptionPane.ERROR_MESSAGE);
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainInternalServerError(e),
+                tr("Internal Server Error"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#InternalServerError")
+        );
     }
 
@@ -128,6 +169,11 @@
      */
     public static void explainBadRequest(OsmApiException e) {
-        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainBadRequest(e), tr("Bad Request"),
-                JOptionPane.ERROR_MESSAGE);
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainBadRequest(e),
+                tr("Bad Request"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#BadRequest")
+        );
     }
 
@@ -139,6 +185,11 @@
      */
     public static void explainNotFound(OsmApiException e) {
-        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainNotFound(e), tr("Not Found"),
-                JOptionPane.ERROR_MESSAGE);
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainNotFound(e),
+                tr("Not Found"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#NotFound")
+        );
     }
 
@@ -149,6 +200,11 @@
      */
     public static void explainConflict(OsmApiException e) {
-        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainConflict(e), tr("Conflict"),
-                JOptionPane.ERROR_MESSAGE);
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainConflict(e),
+                tr("Conflict"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#Conflict")
+        );
     }
 
@@ -162,6 +218,11 @@
 
     public static void explainNestedUnkonwnHostException(OsmTransferException e) {
-        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainNestedUnkonwnHostException(e),
-                tr("Unknown host"), JOptionPane.ERROR_MESSAGE);
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainNestedUnkonwnHostException(e),
+                tr("Unknown host"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#UnknownHost")
+        );
     }
 
@@ -258,7 +319,11 @@
      */
     public static void explainGoneForUnknownPrimitive(OsmApiException e) {
-        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainGoneForUnknownPrimitive(e),
-                tr("Object deleted"), JOptionPane.ERROR_MESSAGE);
-
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainGoneForUnknownPrimitive(e),
+                tr("Object deleted"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#GoneForUnknownPrimitive")
+        );
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 2386)
+++ trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 2387)
@@ -6,5 +6,4 @@
 import java.awt.Component;
 import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.awt.event.KeyEvent;
 import java.awt.event.WindowAdapter;
@@ -14,6 +13,8 @@
 
 import javax.swing.AbstractAction;
+import javax.swing.Action;
 import javax.swing.Icon;
 import javax.swing.JButton;
+import javax.swing.JComponent;
 import javax.swing.JDialog;
 import javax.swing.JLabel;
@@ -108,11 +109,12 @@
         b.setToolTipText(tr("Show help information"));
         HelpUtil.setHelpContext(b, helpTopic);
-        b.addActionListener(
-                new ActionListener() {
-                    public void actionPerformed(ActionEvent e) {
-                        HelpBrowserProxy.getInstance().setUrlForHelpTopic(helpTopic);
-                    }
-                }
-        );
+        Action a = new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                HelpBrowserProxy.getInstance().setUrlForHelpTopic(helpTopic);
+            }
+        };
+        b.addActionListener(a);
+        b.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "enter");
+        b.getActionMap().put("enter", a);
         return b;
     }
@@ -126,5 +128,5 @@
      * <code>helpTopic</code> is the trailing part of a JOSM online help URL, i.e. the part after the leading
      * <code>http://josm.openstreetmap.de/wiki/Help</code>. It should start with a leading '/' and it
-     * may include and anchor after a '#'.
+     * may include an anchor after a '#'.
      * 
      * <strong>Examples</strong>
@@ -210,9 +212,17 @@
                 }
         );
+        dialog.getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0), "close");
+        dialog.getRootPane().getActionMap().put("close", new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                pane.setValue(JOptionPane.CLOSED_OPTION);
+                dialog.setVisible(false);
+            }}
+        );
+
         if (options != null) {
             for (int i=0; i < options.length;i++) {
                 final DefaultAction action = new DefaultAction(dialog, pane, i);
                 buttons.get(i).addActionListener(action);
-                buttons.get(i).getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "enter");
+                buttons.get(i).getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "enter");
                 buttons.get(i).getActionMap().put("enter", action);
             }
@@ -220,5 +230,5 @@
             final DefaultAction action = new DefaultAction(dialog, pane, 0);
             buttons.get(0).addActionListener(action);
-            buttons.get(0).getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "enter");
+            buttons.get(0).getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "enter");
             buttons.get(0).getActionMap().put("enter", action);
         }
@@ -232,3 +242,17 @@
         return (Integer)pane.getValue();
     }
+
+    /**
+     * 
+     * @param parentComponent
+     * @param msg
+     * @param title
+     * @param messageType
+     * @param helpTopic
+     * @return
+     * @see #showOptionDialog(Component, Object, String, int, Icon, ButtonSpec[], ButtonSpec, String)
+     */
+    static public int showOptionDialog(Component parentComponent, Object msg, String title, int messageType,final String helpTopic)  {
+        return showOptionDialog(parentComponent, msg, title, messageType, null,null,null, helpTopic);
+    }
 }
Index: trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 2386)
+++ trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 2387)
@@ -61,9 +61,4 @@
         pnl.setLayout(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
-//        gc.fill = GridBagConstraints.HORIZONTAL;
-//        gc.weightx = 1.0;
-//        gc.weighty = 0.0;
-//        pnl.add(new JButton(actAdd = new AddAction()), gc);
-
         gc.gridy = 0;
         RemoveAction removeAction = new RemoveAction();
Index: trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 2386)
+++ trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 2387)
@@ -18,6 +18,4 @@
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.actions.search.SearchCompiler.ParseError;
-import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
 import org.openstreetmap.josm.io.OsmApi;
 import org.openstreetmap.josm.io.OsmApiException;
@@ -144,6 +142,5 @@
             msg = tr(
                     "<html>The server reported that it has detected a conflict.<br>" +
-                    "Error message (untranslated):<br>" +
-                    "{0}",
+                    "Error message (untranslated):<br>{0}</html>",
                     msg
             );
