Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 5519)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 5520)
@@ -260,5 +260,5 @@
         Collections.sort(keyList, defaultACItemComparator);
 
-        final AutoCompletingComboBox keys = new AutoCompletingComboBox();
+        final AutoCompletingComboBox keys = new AutoCompletingComboBox(key);
         keys.setPossibleACItems(keyList);
         keys.setEditable(true);
@@ -269,5 +269,27 @@
         p.add(keys, GBC.eol().fill(GBC.HORIZONTAL));
 
-        final AutoCompletingComboBox values = new AutoCompletingComboBox();
+        final Map<String, Integer> m = (Map<String, Integer>) propertyData.getValueAt(row, 1);
+
+        Comparator<AutoCompletionListItem> usedValuesAwareComparator = new Comparator<AutoCompletionListItem>() {
+
+            @Override
+            public int compare(AutoCompletionListItem o1, AutoCompletionListItem o2) {
+                boolean c1 = m.containsKey(o1.getValue());
+                boolean c2 = m.containsKey(o2.getValue());
+                if (c1 == c2)
+                    return String.CASE_INSENSITIVE_ORDER.compare(o1.getValue(), o2.getValue());
+                else if (c1)
+                    return -1;
+                else
+                    return +1;
+            }
+        };
+
+        List<AutoCompletionListItem> valueList = autocomplete.getValues(getAutocompletionKeys(key));
+        Collections.sort(valueList, usedValuesAwareComparator);
+
+        final String selection= m.size()!=1?tr("<different>"):m.entrySet().iterator().next().getKey();
+        
+        final AutoCompletingComboBox values = new AutoCompletingComboBox(selection);
         values.setRenderer(new DefaultListCellRenderer() {
             @Override public Component getListCellRendererComponent(JList list,
@@ -289,28 +311,7 @@
             }
         });
+        
         values.setEditable(true);
-
-        final Map<String, Integer> m = (Map<String, Integer>) propertyData.getValueAt(row, 1);
-
-        Comparator<AutoCompletionListItem> usedValuesAwareComparator = new Comparator<AutoCompletionListItem>() {
-
-            @Override
-            public int compare(AutoCompletionListItem o1, AutoCompletionListItem o2) {
-                boolean c1 = m.containsKey(o1.getValue());
-                boolean c2 = m.containsKey(o2.getValue());
-                if (c1 == c2)
-                    return String.CASE_INSENSITIVE_ORDER.compare(o1.getValue(), o2.getValue());
-                else if (c1)
-                    return -1;
-                else
-                    return +1;
-            }
-        };
-
-        List<AutoCompletionListItem> valueList = autocomplete.getValues(getAutocompletionKeys(key));
-        Collections.sort(valueList, usedValuesAwareComparator);
-
         values.setPossibleACItems(valueList);
-        final String selection= m.size()!=1?tr("<different>"):m.entrySet().iterator().next().getKey();
         values.setSelectedItem(selection);
         values.getEditor().setItem(selection);
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java	(revision 5519)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java	(revision 5520)
@@ -146,6 +146,19 @@
     }
 
+    /**
+     * Creates a <code>AutoCompletingComboBox</code> with a default prototype display value.
+     */
     public AutoCompletingComboBox() {
-        super(new AutoCompletionListItem(JosmComboBox.DEFAULT_PROTOTYPE_DISPLAY_VALUE));
+        this(JosmComboBox.DEFAULT_PROTOTYPE_DISPLAY_VALUE);
+    }
+
+    /**
+     * Creates a <code>AutoCompletingComboBox</code> with the specified prototype display value.
+     * @param prototype the <code>Object</code> used to compute the maximum number of elements to be displayed at once before displaying a scroll bar.
+     *                  It also affects the initial width of the combo box.
+     * @since 5520
+     */
+    public AutoCompletingComboBox(String prototype) {
+        super(new AutoCompletionListItem(prototype));
         setRenderer(new AutoCompleteListCellRenderer());
         final JTextComponent editor = (JTextComponent) this.getEditor().getEditorComponent();
