Index: trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java	(revision 8426)
@@ -239,4 +239,5 @@
             JLabel lbl = new JLabel(layer.getName(), layer.getIcon(), SwingConstants.LEFT);
             lbl.setToolTipText(tr("No exporter for this layer"));
+            lbl.setLabelFor(include);
             lbl.setEnabled(false);
             p.add(include, GBC.std());
Index: trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 8426)
@@ -224,10 +224,9 @@
         // -- prepare the combo box with the search expressions
         //
-        JLabel label = new JLabel( initialValues instanceof Filter ? tr("Filter string:") : tr("Search string:"));
+        JLabel label = new JLabel(initialValues instanceof Filter ? tr("Filter string:") : tr("Search string:"));
         final HistoryComboBox hcbSearchString = new HistoryComboBox();
         hcbSearchString.setText(initialValues.text);
         hcbSearchString.setToolTipText(tr("Enter the search expression"));
-        // we have to reverse the history, because ComboBoxHistory will reverse it again
-        // in addElement()
+        // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
         //
         List<String> searchExpressionHistory = getSearchExpressionHistory();
@@ -235,4 +234,5 @@
         hcbSearchString.setPossibleItems(searchExpressionHistory);
         hcbSearchString.setPreferredSize(new Dimension(40, hcbSearchString.getPreferredSize().height));
+        label.setLabelFor(hcbSearchString);
 
         JRadioButton replace = new JRadioButton(tr("replace selection"), initialValues.mode == SearchMode.replace);
Index: trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java	(revision 8426)
@@ -12,6 +12,6 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Set;
-import java.util.Map.Entry;
 
 import javax.swing.JLabel;
@@ -115,8 +115,10 @@
                 );
                 p.add(primitiveLabel, GBC.eol());
+                rolesLabel.setLabelFor(primitiveLabel);
 
                 final RoleCorrectionTable table = new RoleCorrectionTable(roleCorrections);
                 final JScrollPane scrollPane = new JScrollPane(table);
                 p.add(scrollPane, GBC.eop().fill(GBC.HORIZONTAL));
+                primitiveLabel.setLabelFor(table);
 
                 roleTableMap.put(primitive, table);
Index: trunk/src/org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 8426)
@@ -331,6 +331,5 @@
 
                                     // Popup Information
-                                    // display them if the middle mouse button is pressed and
-                                    // keep them until the mouse is moved
+                                    // display them if the middle mouse button is pressed and keep them until the mouse is moved
                                     if (middleMouseDown || isAtOldPosition) {
                                         Collection<OsmPrimitive> osms = mv.getAllNearest(ms.mousePos, OsmPrimitive.isUsablePredicate);
@@ -346,18 +345,13 @@
                                         c.add(lbl, GBC.eol().insets(2, 0, 2, 0));
 
-                                        // Only cycle if the mouse has not been moved and the
-                                        // middle mouse button has been pressed at least twice
-                                        // (the reason for this is the popup != null check for
-                                        // isAtOldPosition, see above. This is a nice side
-                                        // effect though, because it does not change selection
-                                        // of the first middle click)
-                                        if(isAtOldPosition && middleMouseDown) {
-                                            // Hand down mouse modifiers so the SHIFT mod can be
-                                            // handled correctly (see funcion)
+                                        // Only cycle if the mouse has not been moved and the middle mouse button has been pressed at least
+                                        // twice (the reason for this is the popup != null check for isAtOldPosition, see above.
+                                        // This is a nice side effect though, because it does not change selection of the first middle click)
+                                        if (isAtOldPosition && middleMouseDown) {
+                                            // Hand down mouse modifiers so the SHIFT mod can be handled correctly (see function)
                                             popupCycleSelection(osms, ms.modifiers);
                                         }
 
-                                        // These labels may need to be updated from the outside
-                                        // so collect them
+                                        // These labels may need to be updated from the outside so collect them
                                         List<JLabel> lbls = new ArrayList<>(osms.size());
                                         for (final OsmPrimitive osm : osms) {
Index: trunk/src/org/openstreetmap/josm/gui/NoteInputDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/NoteInputDialog.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/NoteInputDialog.java	(revision 8426)
@@ -41,5 +41,4 @@
      */
     public void showNoteDialog(String message, Icon icon) {
-        JLabel label = new JLabel(message);
         textArea.setRows(6);
         textArea.setColumns(30);
@@ -48,4 +47,7 @@
         JScrollPane scrollPane = new JScrollPane(textArea);
         scrollPane.setAlignmentX(Component.LEFT_ALIGNMENT); //without this the label gets pushed to the right
+
+        JLabel label = new JLabel(message);
+        label.setLabelFor(textArea);
 
         JPanel contentPanel = new JPanel();
Index: trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java	(revision 8426)
@@ -38,5 +38,5 @@
     private JButton btnInBackground;
     /** the text area and the scroll pane for the log */
-    private JosmTextArea taLog = new JosmTextArea(5,50);
+    private final JosmTextArea taLog = new JosmTextArea(5,50);
     private  JScrollPane spLog;
 
@@ -136,5 +136,5 @@
     @Override
     public void appendLogMessage(String message) {
-        if (message == null || message.trim().length() ==0 )
+        if (message == null || message.trim().isEmpty())
             return;
         if (!spLog.isVisible()) {
@@ -200,4 +200,3 @@
         this.progressBar.repaint();
     }
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/actionsupport/AlignImageryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/actionsupport/AlignImageryPanel.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/actionsupport/AlignImageryPanel.java	(revision 8426)
@@ -32,9 +32,8 @@
 
     public AlignImageryPanel(boolean oneLine) {
-        super();
-
         Font font = getFont().deriveFont(Font.PLAIN, 14.0f);
         JLabel nagLabel = new JLabel(tr("Aerial imagery might be misaligned. Please check its offset using GPS tracks!"));
         UrlLabel detailsList = new UrlLabel(tr("http://wiki.openstreetmap.org/wiki/Using_Imagery"), tr("Details..."));
+        nagLabel.setLabelFor(detailsList);
         nagLabel.setFont(font);
         detailsList.setFont(font);
@@ -47,5 +46,5 @@
         closeButton.addActionListener(new ActionListener() {
             @Override
-            public void actionPerformed( ActionEvent e ) {
+            public void actionPerformed(ActionEvent e) {
                 if (Main.isDisplayingMapView()) {
                     Main.map.removeTopPanel(AlignImageryPanel.class);
@@ -70,8 +69,8 @@
 
     public static void addNagPanelIfNeeded() {
-        if (Main.isDisplayingMapView() && !Main.pref.getBoolean("expert") && Main.pref.getBoolean(PREF, true) ) {
+        if (Main.isDisplayingMapView() && !Main.pref.getBoolean("expert") && Main.pref.getBoolean(PREF, true)) {
             if (Main.map.getTopPanel(AlignImageryPanel.class) == null) {
                 double w = Toolkit.getDefaultToolkit().getScreenSize().getWidth();
-                AlignImageryPanel p = new AlignImageryPanel(w>1300);
+                AlignImageryPanel p = new AlignImageryPanel(w > 1300);
                 Main.map.addTopPanel(p);
             }
Index: trunk/src/org/openstreetmap/josm/gui/actionsupport/LogShowDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/actionsupport/LogShowDialog.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/actionsupport/LogShowDialog.java	(revision 8426)
@@ -19,8 +19,14 @@
  * Generic dialog with message and scrolling area
  * @author Alexei
+ * @since 5114
  */
 public class LogShowDialog extends ExtendedDialog {
 
-
+    /**
+     * Constructs a new {@code LogShowDialog}.
+     * @param title The text that will be shown in the window titlebar
+     * @param msg Single-line Label
+     * @param log Multi-line log
+     */
     public LogShowDialog(String title, String msg, String log) {
         super(Main.parent, title, new String[] {tr("OK")});
@@ -42,8 +48,9 @@
         txt.setOpaque(false);
 
+        lbl.setLabelFor(txt);
+
         JScrollPane sp = new JScrollPane(txt);
         sp.setOpaque(false);
         sp.setPreferredSize(new Dimension(600,300));
-
 
         p.add(sp, GBC.eop().insets(5,15,0,0).fill(GBC.HORIZONTAL));
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java	(revision 8426)
@@ -45,6 +45,7 @@
  * A UI component for resolving conflicts in two lists of entries of type T.
  *
- * @param <T>  the type of the entries
+ * @param <T> the type of the entries
  * @see ListMergeModel
+ * @since 1631
  */
 public abstract class ListMerger<T extends PrimitiveId> extends JPanel implements PropertyChangeListener, Observer {
@@ -74,9 +75,9 @@
     private transient AdjustmentSynchronizer adjustmentSynchronizer;
 
-    private  JLabel lblMyVersion;
-    private  JLabel lblMergedVersion;
-    private  JLabel lblTheirVersion;
-
-    private  JLabel lblFrozenState;
+    private JLabel lblMyVersion;
+    private JLabel lblMergedVersion;
+    private JLabel lblTheirVersion;
+
+    private JLabel lblFrozenState;
 
     protected abstract JScrollPane buildMyElementsTable();
@@ -124,6 +125,5 @@
 
     protected JPanel buildLeftButtonPanel() {
-        JPanel pnl = new JPanel();
-        pnl.setLayout(new GridBagLayout());
+        JPanel pnl = new JPanel(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
 
@@ -167,6 +167,5 @@
 
     protected JPanel buildRightButtonPanel() {
-        JPanel pnl = new JPanel();
-        pnl.setLayout(new GridBagLayout());
+        JPanel pnl = new JPanel(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
 
@@ -200,6 +199,5 @@
 
     protected JPanel buildMergedListControlButtons() {
-        JPanel pnl = new JPanel();
-        pnl.setLayout(new GridBagLayout());
+        JPanel pnl = new JPanel(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
 
@@ -229,6 +227,5 @@
 
     protected JPanel buildAdjustmentLockControlPanel(JCheckBox cb) {
-        JPanel panel = new JPanel();
-        panel.setLayout(new FlowLayout(FlowLayout.RIGHT));
+        JPanel panel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
         panel.add(new JLabel(tr("lock scrolling")));
         panel.add(cb);
@@ -237,6 +234,5 @@
 
     protected JPanel buildComparePairSelectionPanel() {
-        JPanel p = new JPanel();
-        p.setLayout(new FlowLayout(FlowLayout.LEFT));
+        JPanel p = new JPanel(new FlowLayout(FlowLayout.LEFT));
         p.add(new JLabel(tr("Compare ")));
         JosmComboBox<ComparePairType> cbComparePair = new JosmComboBox<>(model.getComparePairListModel());
@@ -247,6 +243,5 @@
 
     protected JPanel buildFrozeStateControlPanel() {
-        JPanel p = new JPanel();
-        p.setLayout(new FlowLayout(FlowLayout.LEFT));
+        JPanel p = new JPanel(new FlowLayout(FlowLayout.LEFT));
         lblFrozenState = new JLabel();
         p.add(lblFrozenState);
@@ -327,4 +322,5 @@
         gc.insets = new Insets(0,0,0,0);
         JScrollPane pane = buildMyElementsTable();
+        lblMyVersion.setLabelFor(pane);
         adjustmentSynchronizer.adapt(cbLockMyScrolling, pane.getVerticalScrollBar());
         add(pane, gc);
@@ -345,4 +341,5 @@
         gc.weighty = 0.0;
         pane = buildMergedElementsTable();
+        lblMergedVersion.setLabelFor(pane);
         adjustmentSynchronizer.adapt(cbLockMergedScrolling, pane.getVerticalScrollBar());
         add(pane, gc);
@@ -363,4 +360,5 @@
         gc.weighty = 0.0;
         pane = buildTheirElementsTable();
+        lblTheirVersion.setLabelFor(pane);
         adjustmentSynchronizer.adapt(cbLockTheirScrolling, pane.getVerticalScrollBar());
         add(pane, gc);
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMerger.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMerger.java	(revision 8426)
@@ -13,7 +13,11 @@
 /**
  * A UI component for resolving conflicts in the node lists of two {@link Way}s.
- *
+ * @since 1622
  */
 public class NodeListMerger extends ListMerger<Node> implements IConflictResolver {
+
+    /**
+     * Constructs a new {@code NodeListMerger}.
+     */
     public NodeListMerger() {
         super(new NodeListMergeModel());
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java	(revision 8426)
@@ -30,7 +30,6 @@
 
 /**
- * This class represents a UI component for resolving conflicts in some properties
- * of {@link OsmPrimitive}.
- *
+ * This class represents a UI component for resolving conflicts in some properties of {@link OsmPrimitive}.
+ * @since 1654
  */
 public class PropertiesMerger extends JPanel implements Observer, IConflictResolver {
@@ -49,4 +48,13 @@
 
     private final transient PropertiesMergeModel model;
+
+    /**
+     * Constructs a new {@code PropertiesMerger}.
+     */
+    public PropertiesMerger() {
+        model = new PropertiesMergeModel();
+        model.addObserver(this);
+        build();
+    }
 
     protected JLabel buildValueLabel(String name) {
@@ -275,13 +283,4 @@
         buildDeletedStateConflictRows();
         buildReferrersRow();
-    }
-
-    /**
-     * Constructs a new {@code PropertiesMerger}.
-     */
-    public PropertiesMerger() {
-        model = new PropertiesMergeModel();
-        model.addObserver(this);
-        build();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMerger.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMerger.java	(revision 8426)
@@ -12,7 +12,16 @@
 
 /**
- * A UI component for resolving conflicts in the member lists of two {@link Relation}
+ * A UI component for resolving conflicts in the member lists of two {@link Relation}s.
+ * @since 1631
  */
 public class RelationMemberMerger extends ListMerger<RelationMember> implements IConflictResolver {
+
+    /**
+     * Constructs a new {@code RelationMemberMerger}.
+     */
+    public RelationMemberMerger() {
+        super(new RelationMemberListMergeModel());
+    }
+
     @Override
     protected JScrollPane buildMyElementsTable() {
@@ -58,8 +67,4 @@
     }
 
-    public RelationMemberMerger() {
-        super(new RelationMemberListMergeModel());
-    }
-
     @Override
     public void deletePrimitive(boolean deleted) {
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java	(revision 8426)
@@ -32,7 +32,8 @@
 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType;
 import org.openstreetmap.josm.tools.ImageProvider;
+
 /**
  * UI component for resolving conflicts in the tag sets of two {@link OsmPrimitive}s.
- *
+ * @since 1622
  */
 public class TagMerger extends JPanel implements IConflictResolver {
@@ -45,4 +46,12 @@
 
     /**
+     * Constructs a new {@code TagMerger}.
+     */
+    public TagMerger() {
+        model = new TagMergeModel();
+        build();
+    }
+
+    /**
      * embeds table in a new {@link JScrollPane} and returns th scroll pane
      *
@@ -62,5 +71,5 @@
      */
     protected JScrollPane buildMineTagTable() {
-        mineTable  = new JTable(
+        mineTable = new JTable(
                 model,
                 new TagMergeColumnModel(
@@ -78,5 +87,5 @@
      */
     protected JScrollPane buildTheirTable() {
-        theirTable  = new JTable(
+        theirTable = new JTable(
                 model,
                 new TagMergeColumnModel(
@@ -95,5 +104,5 @@
 
     protected JScrollPane buildMergedTable() {
-        mergedTable  = new JTable(
+        mergedTable = new JTable(
                 model,
                 new TagMergeColumnModel(
@@ -123,6 +132,6 @@
         gc.weighty = 0.0;
         gc.insets = new Insets(10,0,10,0);
-        JLabel lbl = new JLabel(tr("My version (local dataset)"));
-        add(lbl, gc);
+        JLabel lblMy = new JLabel(tr("My version (local dataset)"));
+        add(lblMy, gc);
 
         gc.gridx = 2;
@@ -134,6 +143,6 @@
         gc.weightx = 0.0;
         gc.weighty = 0.0;
-        lbl = new JLabel(tr("Merged version"));
-        add(lbl, gc);
+        JLabel lblMerge = new JLabel(tr("Merged version"));
+        add(lblMerge, gc);
 
         gc.gridx = 4;
@@ -146,6 +155,6 @@
         gc.weighty = 0.0;
         gc.insets = new Insets(0,0,0,0);
-        lbl = new JLabel(tr("Their version (server dataset)"));
-        add(lbl, gc);
+        JLabel lblTheir = new JLabel(tr("Their version (server dataset)"));
+        add(lblTheir, gc);
 
         gc.gridx = 0;
@@ -157,5 +166,7 @@
         gc.weightx = 0.3;
         gc.weighty = 1.0;
-        add(buildMineTagTable(), gc);
+        JScrollPane tabMy = buildMineTagTable();
+        lblMy.setLabelFor(tabMy);
+        add(tabMy, gc);
 
         gc.gridx = 1;
@@ -181,5 +192,7 @@
         gc.weightx = 0.3;
         gc.weighty = 1.0;
-        add(buildMergedTable(), gc);
+        JScrollPane tabMerge = buildMergedTable();
+        lblMerge.setLabelFor(tabMerge);
+        add(tabMerge, gc);
 
         gc.gridx = 3;
@@ -204,5 +217,7 @@
         gc.weightx = 0.3;
         gc.weighty = 1.0;
-        add(buildTheirTable(), gc);
+        JScrollPane tabTheir = buildTheirTable();
+        lblTheir.setLabelFor(tabTheir);
+        add(tabTheir, gc);
         theirTable.getSelectionModel().addListSelectionListener(keepTheirAction);
 
@@ -224,13 +239,4 @@
         btnUndecide.setName("button.undecide");
         add(btnUndecide, gc);
-
-    }
-
-    /**
-     * Constructs a new {@code TagMerger}.
-     */
-    public TagMerger() {
-        model = new TagMergeModel();
-        build();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 8426)
@@ -99,4 +99,7 @@
     protected JCheckBox cbWireframe;
 
+    /**
+     * Action that opens the map paint preferences.
+     */
     public static final JosmAction PREFERENCE_ACTION = PreferencesAction.forPreferenceSubTab(
             tr("Map paint preferences"), null, MapPaintPreference.class, /* ICON */ "dialogs/mappaintpreference");
@@ -118,4 +121,5 @@
         JLabel wfLabel = new JLabel(tr("Wireframe View"), ImageProvider.get("dialogs/mappaint", "wireframe_small"), JLabel.HORIZONTAL);
         wfLabel.setFont(wfLabel.getFont().deriveFont(Font.PLAIN));
+        wfLabel.setLabelFor(cbWireframe);
 
         cbWireframe.setModel(new DefaultButtonModel() {
@@ -208,6 +212,11 @@
     protected class StylesModel extends AbstractTableModel implements MapPaintSylesUpdateListener {
 
+        private final Class<?>[] columnClasses = {Boolean.class, StyleSource.class};
+
         private transient List<StyleSource> data = new ArrayList<>();
 
+        /**
+         * Constructs a new {@code StylesModel}.
+         */
         public StylesModel() {
             data = new ArrayList<>(MapPaintStyles.getStyles().getStyleSources());
@@ -240,6 +249,4 @@
             return column == 0;
         }
-
-        private Class<?>[] columnClasses = {Boolean.class, StyleSource.class};
 
         @Override
@@ -286,4 +293,7 @@
     private class MyCheckBoxRenderer extends JCheckBox implements TableCellRenderer {
 
+        /**
+         * Constructs a new {@code MyCheckBoxRenderer}.
+         */
         public MyCheckBoxRenderer() {
             setHorizontalAlignment(SwingConstants.CENTER);
@@ -318,4 +328,7 @@
 
     protected class OnOffAction extends AbstractAction implements ListSelectionListener {
+        /**
+         * Constructs a new {@code OnOffAction}.
+         */
         public OnOffAction() {
             putValue(NAME, tr("On/Off"));
@@ -352,4 +365,8 @@
         private final int increment;
 
+        /**
+         * Constructs a new {@code MoveUpDownAction}.
+         * @param isDown {@code true} to move the entry down, {@code false} to move it up
+         */
         public MoveUpDownAction(boolean isDown) {
             increment = isDown ? 1 : -1;
@@ -384,4 +401,7 @@
 
     protected class ReloadAction extends AbstractAction implements ListSelectionListener {
+        /**
+         * Constructs a new {@code ReloadAction}.
+         */
         public ReloadAction() {
             putValue(NAME, tr("Reload from file"));
@@ -425,5 +445,4 @@
                         }
                     });
-
                 }
             });
@@ -433,4 +452,7 @@
     protected class SaveAsAction extends AbstractAction {
 
+        /**
+         * Constructs a new {@code SaveAsAction}.
+         */
         public SaveAsAction() {
             putValue(NAME, tr("Save as..."));
@@ -523,4 +545,7 @@
     }
 
+    /**
+     * Displays information about selected paint style in a new dialog.
+     */
     protected class InfoAction extends AbstractAction {
 
@@ -528,4 +553,7 @@
         private boolean sourceTabLoaded;
 
+        /**
+         * Constructs a new {@code InfoAction}.
+         */
         public InfoAction() {
             putValue(NAME, tr("Info"));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java	(revision 8426)
@@ -71,8 +71,10 @@
 
         JLabel lbl1 = new JLabel(tr("Object type:"));
+        lbl1.setLabelFor(cbType);
 
         cbType.addItem(trc("osm object types", "mixed"));
         cbType.setToolTipText(tr("Choose the OSM object type"));
         JLabel lbl2 = new JLabel(tr("Object ID:"));
+        lbl2.setLabelFor(cbId);
 
         cbId.setEditor(new BasicComboBoxEditor() {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 8426)
@@ -73,5 +73,5 @@
 /**
  * This class is a toggle dialog that can be turned on and off.
- *
+ * @since 8
  */
 public class ToggleDialog extends JPanel implements ShowHideButtonListener, Helpful, AWTEventListener, Destroyable, PreferenceChangedListener {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 8426)
@@ -635,17 +635,21 @@
         }
 
+        private String code(String text) {
+            return "<code>" + text + "</code> ";
+        }
+
         @Override
         public void setContentPane(Container contentPane) {
             final int commandDownMask = GuiHelper.getMenuShortcutKeyMaskEx();
-            ArrayList<String> lines = new ArrayList<>();
+            List<String> lines = new ArrayList<>();
             Shortcut sc = Shortcut.findShortcut(KeyEvent.VK_1, commandDownMask);
             if (sc != null) {
-                lines.add("<code>"+sc.getKeyText()+"</code> "+tr("to apply first suggestion"));
-            }
-            lines.add("<code>"+KeyEvent.getKeyModifiersText(KeyEvent.SHIFT_MASK)+"+"+KeyEvent.getKeyText(KeyEvent.VK_ENTER)+"</code> "
+                lines.add(code(sc.getKeyText()) + tr("to apply first suggestion"));
+            }
+            lines.add(code(KeyEvent.getKeyModifiersText(KeyEvent.SHIFT_MASK)+"+"+KeyEvent.getKeyText(KeyEvent.VK_ENTER))
                     +tr("to add without closing the dialog"));
             sc = Shortcut.findShortcut(KeyEvent.VK_1, commandDownMask|KeyEvent.SHIFT_DOWN_MASK);
             if (sc != null) {
-                lines.add("<code>"+sc.getKeyText()+"</code> "+tr("to add first suggestion without closing the dialog"));
+                lines.add(code(sc.getKeyText()) + tr("to add first suggestion without closing the dialog"));
             }
             final JLabel helpLabel = new JLabel("<html>" + Utils.join("<br>", lines) + "</html>");
Index: trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java	(revision 8426)
@@ -56,7 +56,7 @@
     private JLabel lblSource;
     private JLabel lblImageryUsed;
-    private JTextArea lblChangesetComment;
-    private JTextArea lblChangesetSource;
-    private JTextArea lblChangesetImageryUsed;
+    private JTextArea texChangesetComment;
+    private JTextArea texChangesetSource;
+    private JTextArea texChangesetImageryUsed;
 
     protected static JTextArea buildTextArea(String tooltip) {
@@ -76,4 +76,5 @@
         lbl.setFont(textArea.getFont());
         lbl.setToolTipText(tooltip);
+        lbl.setLabelFor(textArea);
         return lbl;
     }
@@ -100,12 +101,12 @@
         pnlUserAndChangeset.add(lblChangeset);
 
-        lblChangesetComment = buildTextArea(tr("Changeset comment"));
-        lblChangesetSource = buildTextArea(tr("Changeset source"));
-        lblChangesetImageryUsed = buildTextArea(tr("Imagery used"));
-
-        lblSource = buildLabel(tr("<b>Source</b>:"), tr("Changeset source"), lblChangesetSource);
-        lblImageryUsed = buildLabel(tr("<b>Imagery</b>:"), tr("Imagery used"), lblChangesetImageryUsed);
-        pnlChangesetSource = buildTextPanel(lblSource, lblChangesetSource);
-        pnlChangesetImageryUsed = buildTextPanel(lblImageryUsed, lblChangesetImageryUsed);
+        texChangesetComment = buildTextArea(tr("Changeset comment"));
+        texChangesetSource = buildTextArea(tr("Changeset source"));
+        texChangesetImageryUsed = buildTextArea(tr("Imagery used"));
+
+        lblSource = buildLabel(tr("<b>Source</b>:"), tr("Changeset source"), texChangesetSource);
+        lblImageryUsed = buildLabel(tr("<b>Imagery</b>:"), tr("Imagery used"), texChangesetImageryUsed);
+        pnlChangesetSource = buildTextPanel(lblSource, texChangesetSource);
+        pnlChangesetImageryUsed = buildTextPanel(lblImageryUsed, texChangesetImageryUsed);
 
         setLayout(new GridBagLayout());
@@ -120,5 +121,5 @@
         add(pnlUserAndChangeset, gc);
         gc.gridy = 2;
-        add(lblChangesetComment, gc);
+        add(texChangesetComment, gc);
         gc.gridy = 3;
         add(pnlChangesetSource, gc);
@@ -228,7 +229,7 @@
 
         final Changeset oppCs = model.getPointInTime(pointInTimeType.opposite()).getChangeset();
-        updateText(cs, "comment", lblChangesetComment, null, oppCs, lblChangesetComment);
-        updateText(cs, "source", lblChangesetSource, lblSource, oppCs, pnlChangesetSource);
-        updateText(cs, "imagery_used", lblChangesetImageryUsed, lblImageryUsed, oppCs, pnlChangesetImageryUsed);
+        updateText(cs, "comment", texChangesetComment, null, oppCs, texChangesetComment);
+        updateText(cs, "source", texChangesetSource, lblSource, oppCs, pnlChangesetSource);
+        updateText(cs, "imagery_used", texChangesetImageryUsed, lblImageryUsed, oppCs, pnlChangesetImageryUsed);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java	(revision 8426)
@@ -49,5 +49,5 @@
 
     /** Temporary layer where downloaded primitives are put */
-    private OsmDataLayer tmpLayer;
+    private final OsmDataLayer tmpLayer;
     /** Reference to the task that download requested primitives */
     private DownloadPrimitivesTask mainTask;
@@ -209,10 +209,11 @@
         JPanel p = new JPanel(new GridBagLayout());
         p.add(new HtmlPanel(text), GBC.eop());
+        JosmTextArea txt = new JosmTextArea();
         if (listLabel != null) {
             JLabel missing = new JLabel(listLabel);
             missing.setFont(missing.getFont().deriveFont(Font.PLAIN));
+            missing.setLabelFor(txt);
             p.add(missing, GBC.eol());
         }
-        JosmTextArea txt = new JosmTextArea();
         txt.setFont(GuiHelper.getMonospacedFont(txt));
         txt.setEditable(false);
@@ -227,6 +228,6 @@
                 Main.parent,
                 title,
-                new String[] { tr("Ok") })
-        .setButtonIcons(new String[] { "ok" })
+                new String[] {tr("Ok")})
+        .setButtonIcons(new String[] {"ok"})
         .setIcon(msgType)
         .setContent(p, false);
Index: trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(revision 8426)
@@ -54,4 +54,5 @@
         lblFilename.setPreferredSize(new Dimension(lblFilename.getPreferredSize().width, 19));
         lblFilename.setOpaque(true);
+        lblFilename.setLabelFor(btnFileChooser);
 
         tfFilename.setToolTipText(tr("Either edit the path manually in the text field or click the \"...\" button to open a file chooser."));
Index: trunk/src/org/openstreetmap/josm/gui/io/SaveLayersTableColumnModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/SaveLayersTableColumnModel.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/io/SaveLayersTableColumnModel.java	(revision 8426)
@@ -25,4 +25,7 @@
         private static final GBC defaultCellStyle = GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 0);
 
+        /**
+         * Constructs a new {@code RecommendedActionsTableCell}.
+         */
         public RecommendedActionsTableCell() {
             pnlEmpty.setPreferredSize(new Dimension(1, 19));
@@ -36,5 +39,5 @@
             JPanel panel = new JPanel(new GridBagLayout());
             SaveLayerInfo info = (SaveLayerInfo)value;
-            StringBuilder sb = new StringBuilder();
+            StringBuilder sb = new StringBuilder(24);
             sb.append("<html>");
             if (info.getLayer().requiresUploadToServer() && !info.getLayer().isUploadDiscouraged()) {
@@ -54,5 +57,6 @@
             if (info.getLayer().requiresSaveToFile()) {
                 panel.add(needsSave, defaultCellStyle);
-                sb.append(tr("Layer ''{0}'' has modifications which should be saved to its associated file ''{1}''.", info.getName(), info.getFile().toString()));
+                sb.append(tr("Layer ''{0}'' has modifications which should be saved to its associated file ''{1}''.",
+                        info.getName(), info.getFile().toString()));
             } else {
                 panel.add(pnlEmpty, defaultCellStyle);
@@ -63,4 +67,11 @@
             return panel;
         }
+    }
+
+    /**
+     * Constructs a new {@code SaveLayersTableColumnModel}.
+     */
+    public SaveLayersTableColumnModel() {
+        build();
     }
 
@@ -97,7 +108,3 @@
         addColumn(col);
     }
-
-    public SaveLayersTableColumnModel() {
-        build();
-    }
 }
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRenderer.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRenderer.java	(revision 8426)
@@ -20,4 +20,13 @@
     private JLabel lblCustomText;
     private JProgressBar progressBar;
+
+    /**
+     * Constructs a new {@code UploadAndSaveProgressRenderer}.
+     */
+    public UploadAndSaveProgressRenderer() {
+        build();
+        // initially not visible
+        setVisible(false);
+    }
 
     protected void build() {
@@ -47,10 +56,4 @@
         gc.insets = new Insets(5,0,0,5);
         add(progressBar = new JProgressBar(JProgressBar.HORIZONTAL), gc);
-    }
-
-    public UploadAndSaveProgressRenderer() {
-        build();
-        // initially not visible
-        setVisible(false);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java	(revision 8426)
@@ -31,4 +31,12 @@
     private transient ConfigurationParameterRequestHandler configHandler;
 
+    /**
+     * Constructs a new {@code UploadParameterSummaryPanel}.
+     */
+    public UploadParameterSummaryPanel() {
+        build();
+        updateSummary();
+    }
+
     protected String buildChangesetSummary() {
         StringBuilder msg = new StringBuilder(96);
@@ -56,6 +64,5 @@
         if (spec == null)
             return "";
-        // check whether we can use one changeset only or whether we have to use
-        // multiple changesets
+        // check whether we can use one changeset only or whether we have to use multiple changesets
         //
         boolean useOneChangeset = true;
@@ -113,12 +120,4 @@
     }
 
-    /**
-     * Constructs a new {@code UploadParameterSummaryPanel}.
-     */
-    public UploadParameterSummaryPanel() {
-        build();
-        updateSummary();
-    }
-
     public void setConfigurationParameterRequestListener(ConfigurationParameterRequestHandler handler) {
         this.configHandler = handler;
@@ -141,5 +140,5 @@
 
     protected void updateSummary() {
-        StringBuilder sb = new StringBuilder();
+        StringBuilder sb = new StringBuilder(32);
         sb.append("<html>")
           .append(buildStrategySummary())
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(revision 8426)
@@ -47,5 +47,5 @@
  * This dialog can be used to select individual object for uploading.
  *
- *
+ * @since 2250
  */
 public class UploadSelectionDialog extends JDialog {
@@ -57,11 +57,21 @@
     private SideButton btnContinue;
 
+    /**
+     * Constructs a new {@code UploadSelectionDialog}.
+     */
+    public UploadSelectionDialog() {
+        super(JOptionPane.getFrameForComponent(Main.parent), ModalityType.DOCUMENT_MODAL);
+        build();
+    }
+
     protected JPanel buildSelectedPrimitivesPanel() {
         JPanel pnl = new JPanel();
         pnl.setLayout(new BorderLayout());
-        JLabel lbl = new JLabel(tr("<html>Mark modified objects <strong>from the current selection</strong> to be uploaded to the server.</html>"));
+        JLabel lbl = new JLabel(
+                tr("<html>Mark modified objects <strong>from the current selection</strong> to be uploaded to the server.</html>"));
         lbl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
         pnl.add(lbl, BorderLayout.NORTH);
         pnl.add(new JScrollPane(lstSelectedPrimitives = new OsmPrimitiveList()), BorderLayout.CENTER);
+        lbl.setLabelFor(lstSelectedPrimitives);
         return pnl;
     }
@@ -74,4 +84,5 @@
         pnl.add(lbl, BorderLayout.NORTH);
         pnl.add(new JScrollPane(lstDeletedPrimitives = new OsmPrimitiveList()), BorderLayout.CENTER);
+        lbl.setLabelFor(lstDeletedPrimitives);
         return pnl;
     }
@@ -114,9 +125,4 @@
         setTitle(tr("Select objects to upload"));
         HelpUtil.setHelpContext(getRootPane(), HelpUtil.ht("/Dialog/UploadSelection"));
-    }
-
-    public UploadSelectionDialog() {
-        super(JOptionPane.getFrameForComponent(Main.parent), ModalityType.DOCUMENT_MODAL);
-        build();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java	(revision 8426)
@@ -20,7 +20,6 @@
 
 /**
- * This panel displays a summary of the objects to upload. It is displayed in
- * the upper part of the {@link UploadDialog}.
- *
+ * This panel displays a summary of the objects to upload. It is displayed in the upper part of the {@link UploadDialog}.
+ * @since 2599
  */
 public class UploadedObjectsSummaryPanel extends JPanel {
@@ -40,9 +39,15 @@
     private JScrollPane spDelete;
 
+    /**
+     * Constructs a new {@code UploadedObjectsSummaryPanel}.
+     */
+    public UploadedObjectsSummaryPanel() {
+        build();
+    }
+
     protected void build() {
         setLayout(new GridBagLayout());
         OsmPrimitivRenderer renderer = new OsmPrimitivRenderer();
-        // initialize the three lists for uploaded primitives, but don't add
-        // them to the dialog yet,  see setUploadedPrimitives()
+        // initialize the three lists for uploaded primitives, but don't add them to the dialog yet, see setUploadedPrimitives()
         //
         lstAdd = new PrimitiveList();
@@ -51,4 +56,5 @@
         spAdd = new JScrollPane(lstAdd);
         lblAdd = new JLabel(tr("Objects to add:"));
+        lblAdd.setLabelFor(lstAdd);
 
         lstUpdate = new PrimitiveList();
@@ -57,4 +63,5 @@
         spUpdate = new JScrollPane(lstUpdate);
         lblUpdate = new JLabel(tr("Objects to modify:"));
+        lblUpdate.setLabelFor(lstUpdate);
 
         lstDelete = new PrimitiveList();
@@ -63,4 +70,5 @@
         spDelete = new JScrollPane(lstDelete);
         lblDelete = new JLabel(tr("Objects to delete:"));
+        lblDelete.setLabelFor(lstDelete);
     }
 
@@ -121,8 +129,4 @@
     }
 
-    public UploadedObjectsSummaryPanel() {
-        build();
-    }
-
     /**
      * Replies the number of objects to upload
@@ -138,7 +142,9 @@
     /**
      * A simple list of OSM primitives.
-     *
      */
     static class PrimitiveList extends JList<OsmPrimitive> {
+        /**
+         * Constructs a new {@code PrimitiveList}.
+         */
         public PrimitiveList() {
             super(new PrimitiveListModel());
@@ -152,9 +158,11 @@
     /**
      * A list model for a list of OSM primitives.
-     *
      */
     static class PrimitiveListModel extends AbstractListModel<OsmPrimitive> {
         private transient List<OsmPrimitive> primitives;
 
+        /**
+         * Constructs a new {@code PrimitiveListModel}.
+         */
         public PrimitiveListModel() {
             primitives = new ArrayList<>();
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 8426)
@@ -655,9 +655,9 @@
                 Main.parent,
                 tr("Correlate images with GPX track"),
-                new String[] { tr("Correlate"), tr("Cancel") },
+                new String[] {tr("Correlate"), tr("Cancel")},
                 false
         );
         syncDialog.setContent(panelTf, false);
-        syncDialog.setButtonIcons(new String[] { "ok", "cancel" });
+        syncDialog.setButtonIcons(new String[] {"ok", "cancel"});
         syncDialog.setupDialog();
         outerPanel.add(syncDialog.getContentPane(), BorderLayout.PAGE_START);
Index: trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java	(revision 8426)
@@ -131,4 +131,5 @@
         pnl.add(cbAuthorisationProcedure = new AuthorizationProcedureComboBox(),gc);
         cbAuthorisationProcedure.addItemListener(new AuthorisationProcedureChangeListener());
+        lbl.setLabelFor(cbAuthorisationProcedure);
         return pnl;
     }
Index: trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java	(revision 8426)
@@ -110,9 +110,15 @@
 
     /**
-     * This is the panel displayed in the first step of the semi-automatic authorisation
-     * process.
+     * This is the panel displayed in the first step of the semi-automatic authorisation process.
      */
     private class RetrieveRequestTokenPanel extends JPanel {
         private JCheckBox cbShowAdvancedParameters;
+
+        /**
+         * Constructs a new {@code RetrieveRequestTokenPanel}.
+         */
+        public RetrieveRequestTokenPanel() {
+            build();
+        }
 
         protected JPanel buildAdvancedParametersPanel() {
@@ -195,18 +201,19 @@
             add(buildCommandPanel(), BorderLayout.SOUTH);
         }
-
-        public RetrieveRequestTokenPanel() {
+    }
+
+    /**
+     * This is the panel displayed in the second step of the semi-automatic authorization process.
+     */
+    private class RetrieveAccessTokenPanel extends JPanel {
+
+        private JosmTextField tfAuthoriseUrl;
+
+        /**
+         * Constructs a new {@code RetrieveAccessTokenPanel}.
+         */
+        public RetrieveAccessTokenPanel() {
             build();
         }
-    }
-
-
-    /**
-     * This is the panel displayed in the second step of the semi-automatic authorization
-     * process.
-     */
-    private class RetrieveAccessTokenPanel extends JPanel {
-
-        private JosmTextField tfAuthoriseUrl;
 
         protected JPanel buildTitlePanel() {
@@ -268,8 +275,4 @@
         }
 
-        public RetrieveAccessTokenPanel() {
-            build();
-        }
-
         public void setAuthoriseUrl(String url) {
             tfAuthoriseUrl.setText(url);
@@ -298,4 +301,11 @@
     class ShowAccessTokenPanel extends JPanel {
 
+        /**
+         * Constructs a new {@code ShowAccessTokenPanel}.
+         */
+        public ShowAccessTokenPanel() {
+            build();
+        }
+
         protected JPanel buildTitlePanel() {
             JPanel pnl = new JPanel(new BorderLayout());
@@ -345,8 +355,4 @@
             add(buildContentPanel(), BorderLayout.CENTER);
             add(buildActionPanel(), BorderLayout.SOUTH);
-        }
-
-        public ShowAccessTokenPanel() {
-            build();
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 8426)
@@ -279,4 +279,5 @@
             label = new JLabel(tr("Waypoint labelling"));
             add(label, GBC.std().insets(20,0,0,0));
+            label.setLabelFor(waypointLabel);
             add(waypointLabel, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
             waypointLabel.addActionListener(new ActionListener() {
@@ -299,4 +300,5 @@
             label = new JLabel(tr("Audio waypoint labelling"));
             add(label, GBC.std().insets(20,0,0,0));
+            label.setLabelFor(audioWaypointLabel);
             add(audioWaypointLabel, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
             audioWaypointLabel.addActionListener(new ActionListener() {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java	(revision 8426)
@@ -32,5 +32,6 @@
 
 /**
- * An imagery panel used to add WMS imagery sources
+ * An imagery panel used to add WMS imagery sources.
+ * @since 2599
  */
 public class AddWMSLayerPanel extends AddImageryPanel {
@@ -66,4 +67,5 @@
 
         add(wmsInstruction = new JLabel(tr("4. Verify generated WMS URL")), GBC.eol());
+        wmsInstruction.setLabelFor(wmsUrl);
         add(wmsUrl, GBC.eop().fill());
         wmsUrl.setLineWrap(true);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 8426)
@@ -69,4 +69,5 @@
 /**
  * Imagery preferences, including imagery providers, settings and offsets.
+ * @since 3715
  */
 public final class ImageryPreference extends DefaultTabPreferenceSetting {
@@ -83,5 +84,6 @@
 
     private ImageryPreference() {
-        super(/* ICON(preferences/) */ "imagery", tr("Imagery Preferences"), tr("Modify list of imagery layers displayed in the Imagery menu"), false, new JTabbedPane());
+        super(/* ICON(preferences/) */ "imagery", tr("Imagery Preferences"), tr("Modify list of imagery layers displayed in the Imagery menu"),
+                false, new JTabbedPane());
     }
 
@@ -100,4 +102,5 @@
         final JLabel lbl = new JLabel(name);
         lbl.setFont(lbl.getFont().deriveFont(Font.BOLD));
+        lbl.setLabelFor(section);
         p.add(lbl,GBC.std());
         p.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 0));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/WMSSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/WMSSettingsPanel.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/WMSSettingsPanel.java	(revision 8426)
@@ -60,4 +60,5 @@
         JLabel labelSimConn = new JLabel(tr("Simultaneous connections:"));
         spinSimConn = new JSpinner(new SpinnerNumberModel(WMSLayer.PROP_SIMULTANEOUS_CONNECTIONS.get().intValue(), 1, 30, 1));
+        labelSimConn.setLabelFor(spinSimConn);
         add(labelSimConn, GBC.std());
         add(GBC.glue(5, 0), GBC.std());
@@ -72,4 +73,6 @@
         spinEast = new JSpinner(new SpinnerNumberModel(WMSLayer.PROP_OVERLAP_EAST.get().intValue(), 1, 50, 1));
         spinNorth = new JSpinner(new SpinnerNumberModel(WMSLayer.PROP_OVERLAP_NORTH.get().intValue(), 1, 50, 1));
+        labelEast.setLabelFor(spinEast);
+        labelNorth.setLabelFor(spinNorth);
 
         JPanel overlapPanel = new JPanel(new FlowLayout());
@@ -82,5 +85,5 @@
         add(overlapPanel, GBC.eop());
     }
-    
+
     /**
      * Loads the WMS settings.
@@ -94,5 +97,5 @@
         this.spinSimConn.setValue(WMSLayer.PROP_SIMULTANEOUS_CONNECTIONS.get());
     }
-    
+
     /**
      * Saves the WMS settings.
@@ -107,5 +110,5 @@
 
         HTMLGrabber.PROP_BROWSER.put(browser.getEditor().getItem().toString());
-        
+
         return false;
     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java	(revision 8426)
@@ -60,4 +60,5 @@
 
         final JLabel autosaveIntervalLabel = new JLabel(tr("Auto save interval (seconds)"));
+        autosaveIntervalLabel.setLabelFor(autosaveInterval);
         panel.add(autosaveIntervalLabel, GBC.std().insets(60,0,0,0));
         autosaveInterval.setText(Integer.toString(AutosaveTask.PROP_INTERVAL.get()));
@@ -67,4 +68,5 @@
 
         final JLabel backupPerLayerLabel = new JLabel(tr("Auto saved files per layer"));
+        backupPerLayerLabel.setLabelFor(backupPerLayer);
         panel.add(backupPerLayerLabel, GBC.std().insets(60,0,0,0));
         backupPerLayer.setText(Integer.toString(AutosaveTask.PROP_FILES_PER_LAYER.get()));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 8426)
@@ -256,4 +256,5 @@
                 }
             });
+            lblPlugin.setLabelFor(description);
 
             gbc.gridx = 1;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java	(revision 8426)
@@ -96,4 +96,5 @@
         pnl.add(lblUpdateInterval = new JLabel(tr("Update interval (in days):")));
         pnl.add(tfUpdateInterval = new JosmTextField(5));
+        lblUpdateInterval.setLabelFor(tfUpdateInterval);
         SelectAllOnFocusGainedDecorator.decorate(tfUpdateInterval);
         return pnl;
@@ -126,5 +127,6 @@
         bgTimeBasedUpdatePolicy.add(btn);
 
-        JMultilineLabel lbl = new JMultilineLabel(tr("Please decide whether JOSM shall automatically update active plugins after a certain period of time."));
+        JMultilineLabel lbl = new JMultilineLabel(
+                tr("Please decide whether JOSM shall automatically update active plugins after a certain period of time."));
         gc.gridy=0;
         pnl.add(lbl, gc);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java	(revision 8426)
@@ -329,4 +329,7 @@
         projPanel.add(projSubPrefPanelWrapper, GBC.eol().fill(GBC.HORIZONTAL).insets(20,5,5,5));
 
+        projectionCodeLabel.setLabelFor(projectionCode);
+        projectionNameLabel.setLabelFor(projectionName);
+
         projPanel.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0,5,0,10));
         projPanel.add(new JLabel(tr("Display coordinates as")), GBC.std().insets(5,5,0,5));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/FeaturesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/FeaturesPanel.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/FeaturesPanel.java	(revision 8426)
@@ -50,6 +50,7 @@
             }
         });
-        
+
         intervalLabel = new JLabel(tr("Check interval (minutes):"));
+        intervalLabel.setLabelFor(notifierInterval);
         add(intervalLabel, GBC.std().insets(25, 0, 0, 0));
 
@@ -59,4 +60,5 @@
 
         final JLabel notesDaysClosedLabel = new JLabel(tr("Max age for closed notes (days):"));
+        notesDaysClosedLabel.setLabelFor(notesDaysClosed);
         notesDaysClosedLabel.setToolTipText(tr("Specifies the number of days a note needs to be closed to no longer be downloaded"));
         add(notesDaysClosedLabel, GBC.std().insets(0, 20, 0, 0));
@@ -64,7 +66,6 @@
         notesDaysClosed.setMinimumSize(notesDaysClosed.getPreferredSize());
         add(notesDaysClosed, GBC.eol().insets(5, 20, 0, 0));
+    }
 
-    }
-    
     private void updateEnabledState() {
         boolean enabled = notifier.isSelected();
@@ -100,5 +101,5 @@
         // Even if they have not changed,
         } else {
-            // notifier should be stopped if user is no more identified enough 
+            // notifier should be stopped if user is no more identified enough
             if (!MessageNotifier.isUserEnoughIdentified()) {
                 MessageNotifier.stop();
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java	(revision 8426)
@@ -88,4 +88,5 @@
         gc.weightx = 1.0;
         add(tfOsmServerUrl = new JosmTextField(), gc);
+        lblApiUrl.setLabelFor(tfOsmServerUrl);
         SelectAllOnFocusGainedDecorator.decorate(tfOsmServerUrl);
         valOsmServerUrl = new ApiUrlValidator(tfOsmServerUrl);
Index: trunk/src/org/openstreetmap/josm/io/GpxExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GpxExporter.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/io/GpxExporter.java	(revision 8426)
@@ -95,22 +95,32 @@
         JCheckBox author = new JCheckBox(tr("Add author information"), Main.pref.getBoolean("lastAddAuthor", true));
         p.add(author, GBC.eol());
+
         JLabel nameLabel = new JLabel(tr("Real name"));
         p.add(nameLabel, GBC.std().insets(10, 0, 5, 0));
         JosmTextField authorName = new JosmTextField();
         p.add(authorName, GBC.eol().fill(GBC.HORIZONTAL));
+        nameLabel.setLabelFor(authorName);
+
         JLabel emailLabel = new JLabel(tr("E-Mail"));
         p.add(emailLabel, GBC.std().insets(10, 0, 5, 0));
         JosmTextField email = new JosmTextField();
         p.add(email, GBC.eol().fill(GBC.HORIZONTAL));
+        emailLabel.setLabelFor(email);
+
         JLabel copyrightLabel = new JLabel(tr("Copyright (URL)"));
         p.add(copyrightLabel, GBC.std().insets(10, 0, 5, 0));
         JosmTextField copyright = new JosmTextField();
         p.add(copyright, GBC.std().fill(GBC.HORIZONTAL));
+        copyrightLabel.setLabelFor(copyright);
+
         JButton predefined = new JButton(tr("Predefined"));
         p.add(predefined, GBC.eol().insets(5, 0, 0, 0));
+
         JLabel copyrightYearLabel = new JLabel(tr("Copyright year"));
         p.add(copyrightYearLabel, GBC.std().insets(10, 0, 5, 5));
         JosmTextField copyrightYear = new JosmTextField("");
         p.add(copyrightYear, GBC.eol().fill(GBC.HORIZONTAL));
+        copyrightYearLabel.setLabelFor(copyrightYear);
+
         JLabel warning = new JLabel("<html><font size='-2'>&nbsp;</html");
         p.add(warning, GBC.eol().fill(GBC.HORIZONTAL).insets(15, 0, 0, 0));
Index: trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionExporter.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionExporter.java	(revision 8426)
@@ -45,4 +45,5 @@
         final JLabel lbl = new JLabel(layer.getName(), layer.getIcon(), SwingConstants.LEFT);
         lbl.setToolTipText(layer.getToolTipText());
+        lbl.setLabelFor(export);
         p.add(export, GBC.std());
         p.add(lbl, GBC.std());
Index: trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java	(revision 8426)
@@ -64,5 +64,5 @@
         final JLabel lbl = new JLabel(layer.getName(), layer.getIcon(), SwingConstants.LEFT);
         lbl.setToolTipText(layer.getToolTipText());
-
+        lbl.setLabelFor(export);
         JLabel lblData = new JLabel(tr("Data:"));
         /* I18n: Refer to a OSM data file in session file */ link = new JRadioButton(tr("local file"));
Index: trunk/src/org/openstreetmap/josm/io/session/ImagerySessionExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/ImagerySessionExporter.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/io/session/ImagerySessionExporter.java	(revision 8426)
@@ -57,4 +57,5 @@
         final JLabel lbl = new JLabel(layer.getName(), layer.getIcon(), SwingConstants.LEFT);
         lbl.setToolTipText(layer.getToolTipText());
+        lbl.setLabelFor(export);
         p.add(export, GBC.std());
         p.add(lbl, GBC.std());
Index: trunk/src/org/openstreetmap/josm/io/session/MarkerSessionExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/MarkerSessionExporter.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/io/session/MarkerSessionExporter.java	(revision 8426)
@@ -52,4 +52,5 @@
         final JLabel lbl = new JLabel(layer.getName(), layer.getIcon(), SwingConstants.LEFT);
         lbl.setToolTipText(layer.getToolTipText());
+        lbl.setLabelFor(export);
         p.add(export, GBC.std());
         p.add(lbl, GBC.std());
Index: trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java	(revision 8425)
+++ trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java	(revision 8426)
@@ -89,5 +89,5 @@
         final JLabel lbl = new JLabel(layer.getName(), layer.getIcon(), SwingConstants.LEFT);
         lbl.setToolTipText(layer.getToolTipText());
-
+        lbl.setLabelFor(export);
         JLabel lblData = new JLabel(tr("Data:"));
         /* I18n: Refer to a OSM data file in session file */ link = new JRadioButton(tr("local file"));
