Index: /trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 8037)
+++ /trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 8038)
@@ -37,4 +37,5 @@
 import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
 import org.openstreetmap.josm.gui.widgets.JosmPasswordField;
+import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.io.OsmApi;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -148,5 +149,5 @@
 
     protected static class CredentialPanel extends JPanel {
-        protected JTextField tfUserName;
+        protected JosmTextField tfUserName;
         protected JosmPasswordField tfPassword;
         protected JCheckBox cbSaveCredentials;
@@ -156,5 +157,5 @@
 
         protected void build() {
-            tfUserName = new JTextField(20);
+            tfUserName = new JosmTextField(20);
             tfPassword = new JosmPasswordField(20);
             tfUserName.addFocusListener(new SelectAllOnFocusHandler());
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java	(revision 8037)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java	(revision 8038)
@@ -21,4 +21,5 @@
  * <li>adds an optional "hint" displayed when no text has been entered</li>
  * <li>disables the global advanced key press detector when focused</li>
+ * <li>implements a workaround to <a href="https://bugs.openjdk.java.net/browse/JDK-6322854">JDK bug 6322854</a></li>
  * <br>This class must be used everywhere in core and plugins instead of {@code JTextField}.
  * @since 5886
@@ -73,4 +74,6 @@
         }
         addFocusListener(this);
+        // Workaround for Java bug 6322854
+        JosmPasswordField.workaroundJdkBug6322854(this);
     }
 
