Index: trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java	(revision 3029)
+++ trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java	(revision 3030)
@@ -13,4 +13,5 @@
 import javax.swing.JLabel;
 import javax.swing.JPanel;
+import javax.swing.KeyStroke;
 
 import org.openstreetmap.josm.Main;
@@ -62,4 +63,6 @@
         OsmIdTextField tfId = new OsmIdTextField();
         tfId.setToolTipText(tr("Enter the ID of the object that should be downloaded"));
+        // forward the enter key stroke to the download button
+        tfId.getKeymap().removeKeyStrokeBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false));
         gc.weightx = 1;
         all.add(tfId, gc);
@@ -81,4 +84,5 @@
                 tr("Close dialog and cancel downloading")
         });
+        dialog.setDefaultButton(1);
         dialog.configureContextsensitiveHelp("/Action/DownloadObject", true /* show help button */);
         dialog.showDialog();
Index: trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java	(revision 3029)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java	(revision 3030)
@@ -84,11 +84,21 @@
      */
     public AbstractTextComponentValidator(JTextComponent tc) throws IllegalArgumentException {
+        this(tc, true);
+    }
+
+    /**
+     * Alternative constructor that allows to turn off the actionListener.
+     * This can be useful if the enter key stroke needs to be forwarded to the default button in a dialog.
+     */
+    public AbstractTextComponentValidator(JTextComponent tc, boolean addActionListener) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(tc, "tc");
         this.tc = tc;
         tc.addFocusListener(this);
         tc.getDocument().addDocumentListener(this);
-        if (tc instanceof JTextField) {
-            JTextField tf = (JTextField)tc;
-            tf.addActionListener(this);
+        if (addActionListener) {
+            if (tc instanceof JTextField) {
+                JTextField tf = (JTextField)tc;
+                tf.addActionListener(this);
+            }
         }
         tc.addPropertyChangeListener("enabled", this);
Index: trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java	(revision 3029)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java	(revision 3030)
@@ -33,5 +33,5 @@
 
         public OsmIdValidator(JTextComponent tc) {
-            super(tc);
+            super(tc, false);
         }
 
