Index: trunk/src/org/openstreetmap/josm/gui/oauth/AccessTokenInfoPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/AccessTokenInfoPanel.java	(revision 10182)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/AccessTokenInfoPanel.java	(revision 10183)
@@ -18,11 +18,18 @@
 /**
  * Displays the key and the secret of an OAuth Access Token.
- *
+ * @since 2746
  */
 public class AccessTokenInfoPanel extends JPanel {
 
-    private JosmTextField tfAccessTokenKey;
-    private JosmTextField tfAccessTokenSecret;
-    private JCheckBox cbSaveAccessTokenInPreferences;
+    private final JosmTextField tfAccessTokenKey = new JosmTextField();
+    private final JosmTextField tfAccessTokenSecret = new JosmTextField();
+    private final JCheckBox cbSaveAccessTokenInPreferences = new JCheckBox(tr("Save Access Token in preferences"));
+
+    /**
+     * Constructs a new {@code AccessTokenInfoPanel}.
+     */
+    public AccessTokenInfoPanel() {
+        build();
+    }
 
     protected final void build() {
@@ -39,5 +46,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        add(tfAccessTokenKey = new JosmTextField(), gc);
+        add(tfAccessTokenKey, gc);
         tfAccessTokenKey.setEditable(false);
 
@@ -51,5 +58,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        add(tfAccessTokenSecret = new JosmTextField(), gc);
+        add(tfAccessTokenSecret, gc);
         tfAccessTokenSecret.setEditable(false);
 
@@ -58,5 +65,5 @@
         gc.gridy = 2;
         gc.gridwidth = 2;
-        add(cbSaveAccessTokenInPreferences = new JCheckBox(tr("Save Access Token in preferences")), gc);
+        add(cbSaveAccessTokenInPreferences, gc);
         cbSaveAccessTokenInPreferences.setToolTipText(tr(
                 "<html>Select to save the Access Token in the JOSM preferences.<br>"
@@ -73,8 +80,4 @@
         gc.gridwidth = 2;
         add(new JPanel(), gc);
-    }
-
-    public AccessTokenInfoPanel() {
-        build();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java	(revision 10182)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java	(revision 10183)
@@ -44,12 +44,12 @@
 public class AdvancedOAuthPropertiesPanel extends VerticallyScrollablePanel {
 
-    private JCheckBox cbUseDefaults;
-    private JosmTextField tfConsumerKey;
-    private JosmTextField tfConsumerSecret;
-    private JosmTextField tfRequestTokenURL;
-    private JosmTextField tfAccessTokenURL;
-    private JosmTextField tfAuthoriseURL;
-    private JosmTextField tfOsmLoginURL;
-    private JosmTextField tfOsmLogoutURL;
+    private final JCheckBox cbUseDefaults = new JCheckBox(tr("Use default settings"));
+    private final JosmTextField tfConsumerKey = new JosmTextField();
+    private final JosmTextField tfConsumerSecret = new JosmTextField();
+    private final JosmTextField tfRequestTokenURL = new JosmTextField();
+    private final JosmTextField tfAccessTokenURL = new JosmTextField();
+    private final JosmTextField tfAuthoriseURL = new JosmTextField();
+    private final JosmTextField tfOsmLoginURL = new JosmTextField();
+    private final JosmTextField tfOsmLogoutURL = new JosmTextField();
     private transient UseDefaultItemListener ilUseDefault;
     private String apiUrl;
@@ -65,5 +65,4 @@
         gc.insets = new Insets(0, 0, 3, 3);
         gc.gridwidth = 2;
-        cbUseDefaults = new JCheckBox(tr("Use default settings"));
         add(cbUseDefaults, gc);
 
@@ -76,5 +75,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        add(tfConsumerKey = new JosmTextField(), gc);
+        add(tfConsumerKey, gc);
         SelectAllOnFocusGainedDecorator.decorate(tfConsumerKey);
 
@@ -87,5 +86,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        add(tfConsumerSecret = new JosmTextField(), gc);
+        add(tfConsumerSecret, gc);
         SelectAllOnFocusGainedDecorator.decorate(tfConsumerSecret);
 
@@ -98,5 +97,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        add(tfRequestTokenURL = new JosmTextField(), gc);
+        add(tfRequestTokenURL, gc);
         SelectAllOnFocusGainedDecorator.decorate(tfRequestTokenURL);
 
@@ -109,5 +108,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        add(tfAccessTokenURL = new JosmTextField(), gc);
+        add(tfAccessTokenURL, gc);
         SelectAllOnFocusGainedDecorator.decorate(tfAccessTokenURL);
 
@@ -121,5 +120,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        add(tfAuthoriseURL = new JosmTextField(), gc);
+        add(tfAuthoriseURL, gc);
         SelectAllOnFocusGainedDecorator.decorate(tfAuthoriseURL);
 
@@ -133,5 +132,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        add(tfOsmLoginURL = new JosmTextField(), gc);
+        add(tfOsmLoginURL, gc);
         SelectAllOnFocusGainedDecorator.decorate(tfOsmLoginURL);
 
@@ -145,5 +144,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        add(tfOsmLogoutURL = new JosmTextField(), gc);
+        add(tfOsmLogoutURL, gc);
         SelectAllOnFocusGainedDecorator.decorate(tfOsmLogoutURL);
 
Index: trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java	(revision 10182)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java	(revision 10183)
@@ -60,9 +60,9 @@
 public class FullyAutomaticAuthorizationUI extends AbstractAuthorizationUI {
 
-    private JosmTextField tfUserName;
-    private JosmPasswordField tfPassword;
+    private final JosmTextField tfUserName = new JosmTextField();
+    private final JosmPasswordField tfPassword = new JosmPasswordField();
     private transient UserNameValidator valUserName;
     private transient PasswordValidator valPassword;
-    private AccessTokenInfoPanel pnlAccessTokenInfo;
+    private final AccessTokenInfoPanel pnlAccessTokenInfo = new AccessTokenInfoPanel();
     private OsmPrivilegesPanel pnlOsmPrivileges;
     private JPanel pnlPropertiesPanel;
@@ -120,5 +120,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(tfUserName = new JosmTextField(), gc);
+        pnl.add(tfUserName, gc);
         SelectAllOnFocusGainedDecorator.decorate(tfUserName);
         valUserName = new UserNameValidator(tfUserName);
@@ -135,5 +135,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(tfPassword = new JosmPasswordField(), gc);
+        pnl.add(tfPassword, gc);
         SelectAllOnFocusGainedDecorator.decorate(tfPassword);
         valPassword = new PasswordValidator(tfPassword);
@@ -232,5 +232,5 @@
         gc.gridy = 1;
         gc.insets = new Insets(5, 0, 0, 0);
-        pnl.add(pnlAccessTokenInfo = new AccessTokenInfoPanel(), gc);
+        pnl.add(pnlAccessTokenInfo, gc);
 
         // the actions
Index: trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java	(revision 10182)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java	(revision 10183)
@@ -19,38 +19,6 @@
 public class FullyAutomaticPropertiesPanel extends JPanel {
 
-    private JosmTextField tfUserName;
-    private JosmPasswordField tfPassword;
-
-    protected final JPanel buildUserNamePasswordPanel() {
-        JPanel pnl = new JPanel(new GridBagLayout());
-        GridBagConstraints gc = new GridBagConstraints();
-
-        gc.anchor = GridBagConstraints.NORTHWEST;
-        gc.fill = GridBagConstraints.HORIZONTAL;
-        gc.weightx = 0.0;
-        gc.insets = new Insets(0, 0, 3, 3);
-        pnl.add(new JLabel(tr("Username: ")), gc);
-
-        gc.gridx = 1;
-        gc.weightx = 1.0;
-        pnl.add(tfUserName = new JosmTextField(), gc);
-        SelectAllOnFocusGainedDecorator.decorate(tfUserName);
-        UserNameValidator valUserName = new UserNameValidator(tfUserName);
-        valUserName.validate();
-
-        gc.anchor = GridBagConstraints.NORTHWEST;
-        gc.fill = GridBagConstraints.HORIZONTAL;
-        gc.gridy = 1;
-        gc.gridx = 0;
-        gc.weightx = 0.0;
-        pnl.add(new JLabel(tr("Password: ")), gc);
-
-        gc.gridx = 1;
-        gc.weightx = 1.0;
-        pnl.add(tfPassword = new JosmPasswordField(), gc);
-        SelectAllOnFocusGainedDecorator.decorate(tfPassword);
-
-        return pnl;
-    }
+    private final JosmTextField tfUserName = new JosmTextField();
+    private final JosmPasswordField tfPassword = new JosmPasswordField();
 
     /**
@@ -72,3 +40,35 @@
         add(new JPanel(), gc);
     }
+
+    protected final JPanel buildUserNamePasswordPanel() {
+        JPanel pnl = new JPanel(new GridBagLayout());
+        GridBagConstraints gc = new GridBagConstraints();
+
+        gc.anchor = GridBagConstraints.NORTHWEST;
+        gc.fill = GridBagConstraints.HORIZONTAL;
+        gc.weightx = 0.0;
+        gc.insets = new Insets(0, 0, 3, 3);
+        pnl.add(new JLabel(tr("Username: ")), gc);
+
+        gc.gridx = 1;
+        gc.weightx = 1.0;
+        pnl.add(tfUserName, gc);
+        SelectAllOnFocusGainedDecorator.decorate(tfUserName);
+        UserNameValidator valUserName = new UserNameValidator(tfUserName);
+        valUserName.validate();
+
+        gc.anchor = GridBagConstraints.NORTHWEST;
+        gc.fill = GridBagConstraints.HORIZONTAL;
+        gc.gridy = 1;
+        gc.gridx = 0;
+        gc.weightx = 0.0;
+        pnl.add(new JLabel(tr("Password: ")), gc);
+
+        gc.gridx = 1;
+        gc.weightx = 1.0;
+        pnl.add(tfPassword, gc);
+        SelectAllOnFocusGainedDecorator.decorate(tfPassword);
+
+        return pnl;
+    }
 }
Index: trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java	(revision 10182)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java	(revision 10183)
@@ -34,6 +34,5 @@
 
 /**
- * This is an UI which supports a JOSM user to get an OAuth Access Token in a fully
- * manual process.
+ * This is an UI which supports a JOSM user to get an OAuth Access Token in a fully manual process.
  *
  * @since 2746
@@ -41,11 +40,23 @@
 public class ManualAuthorizationUI extends AbstractAuthorizationUI {
 
-    private JosmTextField tfAccessTokenKey;
+    private final JosmTextField tfAccessTokenKey = new JosmTextField();
     private transient AccessTokenKeyValidator valAccessTokenKey;
-    private JosmTextField tfAccessTokenSecret;
+    private final JosmTextField tfAccessTokenSecret = new JosmTextField();
     private transient AccessTokenSecretValidator valAccessTokenSecret;
-    private JCheckBox cbSaveToPreferences;
-    private HtmlPanel pnlMessage;
+    private final JCheckBox cbSaveToPreferences = new JCheckBox(tr("Save Access Token in preferences"));
+    private final HtmlPanel pnlMessage = new HtmlPanel();
     private final transient Executor executor;
+
+    /**
+     * Constructs a new {@code ManualAuthorizationUI} for the given API URL.
+     * @param apiUrl The OSM API URL
+     * @param executor the executor used for running the HTTP requests for the authorization
+     * @since 5422
+     */
+    public ManualAuthorizationUI(String apiUrl, Executor executor) {
+        super(apiUrl);
+        this.executor = executor;
+        build();
+    }
 
     protected JPanel buildAccessTokenPanel() {
@@ -61,5 +72,4 @@
         gc.gridwidth = 2;
         gc.insets = new Insets(0, 0, 5, 0);
-        pnlMessage = new HtmlPanel();
         pnlMessage.setText("<html><body>"
                 + tr("Please enter an OAuth Access Token which is authorized to access the OSM server "
@@ -77,5 +87,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(tfAccessTokenKey = new JosmTextField(), gc);
+        pnl.add(tfAccessTokenKey, gc);
         SelectAllOnFocusGainedDecorator.decorate(tfAccessTokenKey);
         valAccessTokenKey = new AccessTokenKeyValidator(tfAccessTokenKey);
@@ -91,5 +101,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(tfAccessTokenSecret = new JosmTextField(), gc);
+        pnl.add(tfAccessTokenSecret, gc);
         SelectAllOnFocusGainedDecorator.decorate(tfAccessTokenSecret);
         valAccessTokenSecret = new AccessTokenSecretValidator(tfAccessTokenSecret);
@@ -102,5 +112,5 @@
         gc.gridwidth = 2;
         gc.weightx = 1.0;
-        pnl.add(cbSaveToPreferences = new JCheckBox(tr("Save Access Token in preferences")), gc);
+        pnl.add(cbSaveToPreferences, gc);
         cbSaveToPreferences.setSelected(OAuthAccessTokenHolder.getInstance().isSaveToPreferences());
 
@@ -161,16 +171,4 @@
     }
 
-    /**
-     * Constructs a new {@code ManualAuthorizationUI} for the given API URL.
-     * @param apiUrl The OSM API URL
-     * @param executor the executor used for running the HTTP requests for the authorization
-     * @since 5422
-     */
-    public ManualAuthorizationUI(String apiUrl, Executor executor) {
-        super(apiUrl);
-        this.executor = executor;
-        build();
-    }
-
     @Override
     public boolean isSaveAccessTokenToPreferences() {
Index: trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java	(revision 10182)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java	(revision 10183)
@@ -64,5 +64,5 @@
     private final String apiUrl;
 
-    private AuthorizationProcedureComboBox cbAuthorisationProcedure;
+    private final AuthorizationProcedureComboBox cbAuthorisationProcedure = new AuthorizationProcedureComboBox();
     private FullyAutomaticAuthorizationUI pnlFullyAutomaticAuthorisationUI;
     private SemiAutomaticAuthorizationUI pnlSemiAutomaticAuthorisationUI;
@@ -150,5 +150,5 @@
         gc.gridwidth = 1;
         gc.weightx = 1.0;
-        pnl.add(cbAuthorisationProcedure = new AuthorizationProcedureComboBox(), gc);
+        pnl.add(cbAuthorisationProcedure, gc);
         cbAuthorisationProcedure.addItemListener(new AuthorisationProcedureChangeListener());
         lbl.setLabelFor(cbAuthorisationProcedure);
Index: trunk/src/org/openstreetmap/josm/gui/oauth/OsmPrivilegesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/OsmPrivilegesPanel.java	(revision 10182)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/OsmPrivilegesPanel.java	(revision 10183)
@@ -17,10 +17,17 @@
 public class OsmPrivilegesPanel extends VerticallyScrollablePanel {
 
-    private JCheckBox cbWriteApi;
-    private JCheckBox cbWriteGpx;
-    private JCheckBox cbReadGpx;
-    private JCheckBox cbWritePrefs;
-    private JCheckBox cbReadPrefs;
-    private JCheckBox cbModifyNotes;
+    private final JCheckBox cbWriteApi = new JCheckBox();
+    private final JCheckBox cbWriteGpx = new JCheckBox();
+    private final JCheckBox cbReadGpx = new JCheckBox();
+    private final JCheckBox cbWritePrefs = new JCheckBox();
+    private final JCheckBox cbReadPrefs = new JCheckBox();
+    private final JCheckBox cbModifyNotes = new JCheckBox();
+
+    /**
+     * Constructs a new {@code OsmPrivilegesPanel}.
+     */
+    public OsmPrivilegesPanel() {
+        build();
+    }
 
     protected final void build() {
@@ -35,5 +42,5 @@
         gc.weightx = 1.0;
         gc.insets = new Insets(0, 0, 3, 3);
-        add(cbWriteApi = new JCheckBox(), gc);
+        add(cbWriteApi, gc);
         cbWriteApi.setText(tr("Allow to upload map data"));
         cbWriteApi.setToolTipText(tr("Select to grant JOSM the right to upload map data on your behalf"));
@@ -43,5 +50,5 @@
         //
         gc.gridy = 1;
-        add(cbWriteGpx = new JCheckBox(), gc);
+        add(cbWriteGpx, gc);
         cbWriteGpx.setText(tr("Allow to upload GPS traces"));
         cbWriteGpx.setToolTipText(tr("Select to grant JOSM the right to upload GPS traces on your behalf"));
@@ -51,5 +58,5 @@
         //
         gc.gridy = 2;
-        add(cbReadGpx = new JCheckBox(), gc);
+        add(cbReadGpx, gc);
         cbReadGpx.setText(tr("Allow to download your private GPS traces"));
         cbReadGpx.setToolTipText(tr("Select to grant JOSM the right to download your private GPS traces into JOSM layers"));
@@ -59,5 +66,5 @@
         //
         gc.gridy = 3;
-        add(cbReadPrefs = new JCheckBox(), gc);
+        add(cbReadPrefs, gc);
         cbReadPrefs.setText(tr("Allow to read your preferences"));
         cbReadPrefs.setToolTipText(tr("Select to grant JOSM the right to read your server preferences"));
@@ -67,5 +74,5 @@
         //
         gc.gridy = 4;
-        add(cbWritePrefs = new JCheckBox(), gc);
+        add(cbWritePrefs, gc);
         cbWritePrefs.setText(tr("Allow to write your preferences"));
         cbWritePrefs.setToolTipText(tr("Select to grant JOSM the right to write your server preferences"));
@@ -73,5 +80,5 @@
 
         gc.gridy = 5;
-        add(cbModifyNotes = new JCheckBox(), gc);
+        add(cbModifyNotes, gc);
         cbModifyNotes.setText(tr("Allow modifications of notes"));
         cbModifyNotes.setToolTipText(tr("Select to grant JOSM the right to modify notes on your behalf"));
@@ -84,11 +91,4 @@
         gc.weighty = 1.0;
         add(new JPanel(), gc);
-    }
-
-    /**
-     * Constructs a new {@code OsmPrivilegesPanel}.
-     */
-    public OsmPrivilegesPanel() {
-        build();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java	(revision 10182)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java	(revision 10183)
@@ -41,5 +41,5 @@
  */
 public class SemiAutomaticAuthorizationUI extends AbstractAuthorizationUI {
-    private AccessTokenInfoPanel pnlAccessTokenInfo;
+    private final AccessTokenInfoPanel pnlAccessTokenInfo = new AccessTokenInfoPanel();
     private transient OAuthToken requestToken;
 
@@ -217,5 +217,5 @@
     private class RetrieveAccessTokenPanel extends JPanel {
 
-        private JosmTextField tfAuthoriseUrl;
+        private final JosmTextField tfAuthoriseUrl = new JosmTextField();
 
         /**
@@ -261,5 +261,5 @@
             gc.gridx = 1;
             gc.weightx = 1.0;
-            pnl.add(tfAuthoriseUrl = new JosmTextField(), gc);
+            pnl.add(tfAuthoriseUrl, gc);
             tfAuthoriseUrl.setEditable(false);
 
@@ -340,5 +340,5 @@
             gc.weightx = 1.0;
             gc.gridwidth = 1;
-            pnl.add(pnlAccessTokenInfo = new AccessTokenInfoPanel(), gc);
+            pnl.add(pnlAccessTokenInfo, gc);
             pnlAccessTokenInfo.setSaveToPreferences(
                     OAuthAccessTokenHolder.getInstance().isSaveToPreferences()
