Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java	(revision 10072)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java	(revision 10073)
@@ -31,4 +31,5 @@
 import org.openstreetmap.josm.gui.JosmUserIdentityManager;
 import org.openstreetmap.josm.gui.help.HelpUtil;
+import org.openstreetmap.josm.gui.preferences.server.UserNameValidator;
 import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator;
@@ -380,5 +381,5 @@
         private transient UidInputFieldValidator valUid;
         private JosmTextField tfUserName;
-        private transient UserNameInputValidator valUserName;
+        private transient UserNameValidator valUserName;
         private JMultilineLabel lblRestrictedToMyself;
 
@@ -414,5 +415,5 @@
             pnl.add(tfUserName = new JosmTextField(10), gc);
             SelectAllOnFocusGainedDecorator.decorate(tfUserName);
-            valUserName = UserNameInputValidator.decorate(tfUserName);
+            valUserName = new UserNameValidator(tfUserName);
 
             // grab remaining space
@@ -1013,29 +1014,4 @@
     }
 
-    private static class UserNameInputValidator extends AbstractTextComponentValidator {
-        public static UserNameInputValidator decorate(JTextComponent tc) {
-            return new UserNameInputValidator(tc);
-        }
-
-        UserNameInputValidator(JTextComponent tc) {
-            super(tc);
-        }
-
-        @Override
-        public boolean isValid() {
-            return !getComponent().getText().trim().isEmpty();
-        }
-
-        @Override
-        public void validate() {
-            String value  = getComponent().getText();
-            if (value.trim().isEmpty()) {
-                feedbackInvalid(tr("<html>The  current value is not a valid user name.<br>Please enter an non-empty user name.</html>"));
-                return;
-            }
-            feedbackValid(tr("Please enter an non-empty user name"));
-        }
-    }
-
     /**
      * Validates dates entered as text in a {@link JTextComponent}. Validates the input
@@ -1147,5 +1123,4 @@
         @Override
         public void validate() {
-
             if (!isValid()) {
                 String msg = "<html>The current value isn't a valid time.<br>" + getStandardTooltipText() + "</html>";
Index: trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java	(revision 10072)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java	(revision 10073)
@@ -35,6 +35,7 @@
 import org.openstreetmap.josm.gui.SideButton;
 import org.openstreetmap.josm.gui.help.HelpUtil;
+import org.openstreetmap.josm.gui.preferences.server.UserNameValidator;
 import org.openstreetmap.josm.gui.util.GuiHelper;
-import org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator;
+import org.openstreetmap.josm.gui.widgets.DefaultTextComponentValidator;
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
 import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
@@ -390,42 +391,7 @@
     }
 
-    private static class UserNameValidator extends AbstractTextComponentValidator {
-        UserNameValidator(JTextComponent tc) {
-            super(tc);
-        }
-
-        @Override
-        public boolean isValid() {
-            return !getComponent().getText().trim().isEmpty();
-        }
-
-        @Override
-        public void validate() {
-            if (isValid()) {
-                feedbackValid(tr("Please enter your OSM user name"));
-            } else {
-                feedbackInvalid(tr("The user name cannot be empty. Please enter your OSM user name"));
-            }
-        }
-    }
-
-    private static class PasswordValidator extends AbstractTextComponentValidator {
-
+    static class PasswordValidator extends DefaultTextComponentValidator {
         PasswordValidator(JTextComponent tc) {
-            super(tc);
-        }
-
-        @Override
-        public boolean isValid() {
-            return !getComponent().getText().trim().isEmpty();
-        }
-
-        @Override
-        public void validate() {
-            if (isValid()) {
-                feedbackValid(tr("Please enter your OSM password"));
-            } else {
-                feedbackInvalid(tr("The password cannot be empty. Please enter your OSM password"));
-            }
+            super(tc, tr("Please enter your OSM password"), tr("The password cannot be empty. Please enter your OSM password"));
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java	(revision 10072)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java	(revision 10073)
@@ -11,7 +11,6 @@
 import javax.swing.JLabel;
 import javax.swing.JPanel;
-import javax.swing.text.JTextComponent;
 
-import org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator;
+import org.openstreetmap.josm.gui.preferences.server.UserNameValidator;
 import org.openstreetmap.josm.gui.widgets.JosmPasswordField;
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
@@ -73,24 +72,3 @@
         add(new JPanel(), gc);
     }
-
-    private static class UserNameValidator extends AbstractTextComponentValidator {
-
-        UserNameValidator(JTextComponent tc) {
-            super(tc);
-        }
-
-        @Override
-        public boolean isValid() {
-            return !getComponent().getText().trim().isEmpty();
-        }
-
-        @Override
-        public void validate() {
-            if (isValid()) {
-                feedbackValid(tr("Please enter your OSM user name"));
-            } else {
-                feedbackInvalid(tr("The user name cannot be empty. Please enter your OSM user name"));
-            }
-        }
-    }
 }
Index: trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java	(revision 10072)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java	(revision 10073)
@@ -27,5 +27,5 @@
 import org.openstreetmap.josm.gui.SideButton;
 import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder;
-import org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator;
+import org.openstreetmap.josm.gui.widgets.DefaultTextComponentValidator;
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
@@ -178,42 +178,15 @@
     }
 
-    private static class AccessTokenKeyValidator extends AbstractTextComponentValidator {
-
+    private static class AccessTokenKeyValidator extends DefaultTextComponentValidator {
         AccessTokenKeyValidator(JTextComponent tc) {
-            super(tc);
-        }
-
-        @Override
-        public boolean isValid() {
-            return !getComponent().getText().trim().isEmpty();
-        }
-
-        @Override
-        public void validate() {
-            if (isValid()) {
-                feedbackValid(tr("Please enter an Access Token Key"));
-            } else {
-                feedbackInvalid(tr("The Access Token Key must not be empty. Please enter an Access Token Key"));
-            }
-        }
-    }
-
-    private static class AccessTokenSecretValidator extends AbstractTextComponentValidator {
+            super(tc, tr("Please enter an Access Token Key"),
+                      tr("The Access Token Key must not be empty. Please enter an Access Token Key"));
+        }
+    }
+
+    private static class AccessTokenSecretValidator extends DefaultTextComponentValidator {
         AccessTokenSecretValidator(JTextComponent tc) {
-            super(tc);
-        }
-
-        @Override
-        public boolean isValid() {
-            return !getComponent().getText().trim().isEmpty();
-        }
-
-        @Override
-        public void validate() {
-            if (isValid()) {
-                feedbackValid(tr("Please enter an Access Token Secret"));
-            } else {
-                feedbackInvalid(tr("The Access Token Secret must not be empty. Please enter an Access Token Secret"));
-            }
+            super(tc, tr("Please enter an Access Token Secret"),
+                      tr("The Access Token Secret must not be empty. Please enter an Access Token Secret"));
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java	(revision 10072)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java	(revision 10073)
@@ -110,4 +110,11 @@
         repaint();
         pnlShowAccessToken.setAccessToken(getAccessToken());
+    }
+
+    static class StepLabel extends JLabel {
+        StepLabel(String text) {
+            super(text);
+            setFont(getFont().deriveFont(16f));
+        }
     }
 
@@ -199,7 +206,5 @@
         protected final void build() {
             setLayout(new BorderLayout(0, 5));
-            JLabel lbl = new JLabel(tr("<html>Step 1/3: Retrieve an OAuth Request Token</html>"));
-            lbl.setFont(lbl.getFont().deriveFont(16f));
-            add(lbl, BorderLayout.NORTH);
+            add(new StepLabel(tr("<html>Step 1/3: Retrieve an OAuth Request Token</html>")), BorderLayout.NORTH);
             add(buildAdvancedParametersPanel(), BorderLayout.CENTER);
             add(buildCommandPanel(), BorderLayout.SOUTH);
@@ -223,7 +228,5 @@
         protected JPanel buildTitlePanel() {
             JPanel pnl = new JPanel(new BorderLayout());
-            JLabel lbl = new JLabel(tr("<html>Step 2/3: Authorize and retrieve an Access Token</html>"));
-            lbl.setFont(lbl.getFont().deriveFont(16f));
-            pnl.add(lbl, BorderLayout.CENTER);
+            pnl.add(new StepLabel(tr("<html>Step 2/3: Authorize and retrieve an Access Token</html>")), BorderLayout.CENTER);
             return pnl;
         }
@@ -266,5 +269,4 @@
         protected JPanel buildActionPanel() {
             JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT));
-
             pnl.add(new SideButton(new BackAction()));
             pnl.add(new SideButton(new RetrieveAccessTokenAction()));
@@ -314,7 +316,5 @@
         protected JPanel buildTitlePanel() {
             JPanel pnl = new JPanel(new BorderLayout());
-            JLabel lbl = new JLabel(tr("<html>Step 3/3: Successfully retrieved an Access Token</html>"));
-            lbl.setFont(lbl.getFont().deriveFont(16f));
-            pnl.add(lbl, BorderLayout.CENTER);
+            pnl.add(new StepLabel(tr("<html>Step 3/3: Successfully retrieved an Access Token</html>")), BorderLayout.CENTER);
             return pnl;
         }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/UserNameValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/UserNameValidator.java	(revision 10072)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/UserNameValidator.java	(revision 10073)
@@ -6,10 +6,10 @@
 import javax.swing.text.JTextComponent;
 
-import org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator;
+import org.openstreetmap.josm.gui.widgets.DefaultTextComponentValidator;
 
 /**
  * Validator for OSM username.
  */
-public class UserNameValidator extends AbstractTextComponentValidator {
+public class UserNameValidator extends DefaultTextComponentValidator {
 
     /**
@@ -18,19 +18,5 @@
      */
     public UserNameValidator(JTextComponent tc) {
-        super(tc);
-    }
-
-    @Override
-    public boolean isValid() {
-        return !getComponent().getText().trim().isEmpty();
-    }
-
-    @Override
-    public void validate() {
-        if (isValid()) {
-            feedbackValid(tr("Please enter your OSM user name"));
-        } else {
-            feedbackInvalid(tr("The user name cannot be empty. Please enter your OSM user name"));
-        }
+        super(tc, tr("Please enter your OSM user name"), tr("The user name cannot be empty. Please enter your OSM user name"));
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/DefaultTextComponentValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/DefaultTextComponentValidator.java	(revision 10073)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/DefaultTextComponentValidator.java	(revision 10073)
@@ -0,0 +1,40 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.widgets;
+
+import javax.swing.text.JTextComponent;
+
+/**
+ * Default text component validator that only checks that an input field is not empty.
+ * @since 10073
+ */
+public class DefaultTextComponentValidator extends AbstractTextComponentValidator {
+
+    private final String validFeedback;
+    private final String invalidFeedback;
+
+    /**
+     * Constructs a new {@code DefaultTextComponentValidator}.
+     * @param tc he text component. Must not be null.
+     * @param validFeedback text displayed for valid feedback
+     * @param invalidFeedback text displayed for invalid feedback
+     */
+    public DefaultTextComponentValidator(JTextComponent tc, String validFeedback, String invalidFeedback) {
+        super(tc);
+        this.validFeedback = validFeedback;
+        this.invalidFeedback = invalidFeedback;
+    }
+
+    @Override
+    public boolean isValid() {
+        return !getComponent().getText().trim().isEmpty();
+    }
+
+    @Override
+    public void validate() {
+        if (isValid()) {
+            feedbackValid(validFeedback);
+        } else {
+            feedbackInvalid(invalidFeedback);
+        }
+    }
+}
