Index: trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java	(revision 2217)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java	(revision 2218)
@@ -26,5 +26,4 @@
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
@@ -76,5 +75,5 @@
 import org.openstreetmap.josm.gui.preferences.TaggingPresetPreference;
 import org.openstreetmap.josm.gui.tagging.TaggingPreset;
-import org.openstreetmap.josm.tools.AutoCompleteComboBox;
+import org.openstreetmap.josm.gui.widgets.AutoCompleteComboBox;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -529,6 +528,7 @@
         boolean top = Main.pref.getBoolean("properties.presets.top", true);
         bothTables.setLayout(new GridBagLayout());
-        if(top)
+        if(top) {
             bothTables.add(presets, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2));
+        }
         bothTables.add(selectSth, GBC.eol().fill().insets(10, 10, 10, 10));
         bothTables.add(propertyTable.getTableHeader(), GBC.eol().fill(GBC.HORIZONTAL));
@@ -536,6 +536,7 @@
         bothTables.add(membershipTable.getTableHeader(), GBC.eol().fill(GBC.HORIZONTAL));
         bothTables.add(membershipTable, GBC.eol().fill(GBC.BOTH));
-        if(!top)
+        if(!top) {
             bothTables.add(presets, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2));
+        }
 
         DblClickWatch dblClickWatch = new DblClickWatch();
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 2217)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 2218)
@@ -52,8 +52,8 @@
 import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
 import org.openstreetmap.josm.gui.SideButton;
-import org.openstreetmap.josm.gui.historycombobox.SuggestingJHistoryComboBox;
 import org.openstreetmap.josm.gui.tagging.TagEditorModel;
 import org.openstreetmap.josm.gui.tagging.TagEditorPanel;
 import org.openstreetmap.josm.gui.tagging.TagModel;
+import org.openstreetmap.josm.gui.widgets.HistoryComboBox;
 import org.openstreetmap.josm.io.OsmApi;
 import org.openstreetmap.josm.tools.GBC;
@@ -588,5 +588,5 @@
         private JCheckBox cbCloseAfterUpload;
         private OpenChangesetModel model;
-        private SuggestingJHistoryComboBox cmt;
+        private HistoryComboBox cmt;
         private JCheckBox cbUseAtomicUpload;
 
@@ -616,7 +616,7 @@
             pnl.setLayout(new GridBagLayout());
             pnl.add(new JLabel(tr("Provide a brief comment for the changes you are uploading:")), GBC.eol().insets(0, 5, 10, 3));
-            cmt = new SuggestingJHistoryComboBox();
+            cmt = new HistoryComboBox();
             List<String> cmtHistory = new LinkedList<String>(Main.pref.getCollection(HISTORY_KEY, new LinkedList<String>()));
-            cmt.setHistory(cmtHistory);
+            cmt.setPossibleItems(cmtHistory);
             cmt.getEditor().addActionListener(
                     new ActionListener() {
Index: trunk/src/org/openstreetmap/josm/gui/widgets/AutoCompleteComboBox.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/AutoCompleteComboBox.java	(revision 2218)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/AutoCompleteComboBox.java	(revision 2218)
@@ -0,0 +1,108 @@
+// License: GPL. Copyright 2007 by Immanuel Scholz and others
+package org.openstreetmap.josm.gui.widgets;
+
+import java.util.Collection;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.text.AttributeSet;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.JTextComponent;
+import javax.swing.text.PlainDocument;
+
+/**
+ * @author guilhem.bonnefille@gmail.com
+ */
+public class AutoCompleteComboBox extends JComboBox {
+
+    /**
+     * Auto-complete a JComboBox.
+     *
+     * Inspired by http://www.orbital-computer.de/JComboBox/
+     */
+    private class AutoCompleteComboBoxDocument extends PlainDocument {
+        private JComboBox comboBox;
+        private boolean selecting = false;
+
+        public AutoCompleteComboBoxDocument(final JComboBox comboBox) {
+            this.comboBox = comboBox;
+        }
+
+        @Override public void remove(int offs, int len) throws BadLocationException {
+            if (selecting)
+                return;
+            super.remove(offs, len);
+        }
+
+        @Override public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
+            if(selecting || (offs == 0 && str.equals(getText(0, getLength()))))
+                return;
+            boolean initial = (offs == 0 && getLength() == 0 && str.length() > 1);
+            super.insertString(offs, str, a);
+
+            // return immediately when selecting an item
+            // Note: this is done after calling super method because we need
+            // ActionListener informed
+            if (selecting)
+                return;
+
+            int size = getLength();
+            int start = offs+str.length();
+            int end = start;
+            String curText = getText(0, size);
+            // lookup and select a matching item
+            Object item = lookupItem(curText);
+            setSelectedItem(item);
+            if(initial) {
+                start = 0;
+            }
+            if (item != null) {
+                String newText = item.toString();
+                if(!newText.equals(curText))
+                {
+                    selecting = true;
+                    super.remove(0, size);
+                    super.insertString(0, newText, a);
+                    selecting = false;
+                    start = size;
+                    end = getLength();
+                }
+            }
+            JTextComponent editor = (JTextComponent)comboBox.getEditor().getEditorComponent();
+            editor.setSelectionStart(start);
+            editor.setSelectionEnd(end);
+        }
+
+        private void setSelectedItem(Object item) {
+            selecting = true;
+            comboBox.setSelectedItem(item);
+            selecting = false;
+        }
+
+        private Object lookupItem(String pattern) {
+            ComboBoxModel model = comboBox.getModel();
+            for (int i = 0, n = model.getSize(); i < n; i++) {
+                Object currentItem = model.getElementAt(i);
+                if (currentItem.toString().startsWith(pattern))
+                    return currentItem;
+            }
+            return null;
+        }
+    }
+
+    public AutoCompleteComboBox() {
+        JTextComponent editor = (JTextComponent) this.getEditor().getEditorComponent();
+        editor.setDocument(new AutoCompleteComboBoxDocument(this));
+    }
+
+    public void setPossibleItems(Collection<String> elems) {
+        DefaultComboBoxModel model = (DefaultComboBoxModel)this.getModel();
+        Object oldValue = this.getEditor().getItem();
+        model.removeAllElements();
+        for (String elem : elems) {
+            model.addElement(elem);
+        }
+        this.getEditor().setItem(oldValue);
+    }
+}
Index: trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java	(revision 2218)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java	(revision 2218)
@@ -0,0 +1,112 @@
+/* Copyright (c) 2008, Henrik Niehaus
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.openstreetmap.josm.gui.widgets;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.swing.DefaultComboBoxModel;
+
+public class ComboBoxHistory extends DefaultComboBoxModel implements Iterable<String> {
+
+    private int maxSize = 10;
+
+    public ComboBoxHistory(int size) {
+        maxSize = size;
+    }
+
+    /**
+     * Adds or moves an element to the top of the history
+     */
+    @Override
+    public void addElement(Object o) {
+        String newEntry = (String)o;
+
+        // if history contains this object already, delete it,
+        // so that it looks like a move to the top
+        for (int i = 0; i < getSize(); i++) {
+            String oldEntry = (String) getElementAt(i);
+            if(oldEntry.equals(newEntry)) {
+                removeElementAt(i);
+            }
+        }
+
+        // insert element at the top
+        insertElementAt(o, 0);
+
+        // remove an element, if the history gets too large
+        if(getSize()> maxSize) {
+            removeElementAt(getSize()-1);
+        }
+
+        // set selected item to the one just added
+        setSelectedItem(o);
+    }
+
+    public Iterator<String> iterator() {
+        return new Iterator<String>() {
+
+            private int position = -1;
+
+            public void remove() {
+                removeElementAt(position);
+            }
+
+            public boolean hasNext() {
+                if(position < getSize()-1 && getSize()>0)
+                    return true;
+                return false;
+            }
+
+            public String next() {
+                position++;
+                return getElementAt(position).toString();
+            }
+
+        };
+    }
+
+    public void setItems(List<String> items) {
+        removeAllElements();
+        Collections.reverse(items);
+        for (String item : items) {
+            addElement(item);
+        }
+        Collections.reverse(items);
+    }
+
+    public List<String> asList() {
+        List<String> list = new ArrayList<String>(maxSize);
+        for (String item : this) {
+            list.add(item);
+        }
+        return list;
+    }
+}
Index: trunk/src/org/openstreetmap/josm/gui/widgets/HistoryComboBox.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/HistoryComboBox.java	(revision 2218)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/HistoryComboBox.java	(revision 2218)
@@ -0,0 +1,36 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.widgets;
+
+import java.util.List;
+
+import javax.swing.text.JTextComponent;
+
+public class HistoryComboBox extends AutoCompleteComboBox {
+    private ComboBoxHistory model;
+
+    public HistoryComboBox() {
+        setModel(model = new ComboBoxHistory(15));
+        setEditable(true);
+    }
+
+    public String getText() {
+        return ((JTextComponent)getEditor().getEditorComponent()).getText();
+    }
+
+    public void setText(String value) {
+        ((JTextComponent)getEditor().getEditorComponent()).setText(value);
+    }
+
+    public void addCurrentItemToHistory() {
+        String regex = (String)getEditor().getItem();
+        model.addElement(regex);
+    }
+
+    public void setHistory(List<String> history) {
+        model.setItems(history);
+    }
+
+    public List<String> getHistory() {
+        return model.asList();
+    }
+}
Index: trunk/src/org/openstreetmap/josm/tools/AutoCompleteComboBox.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/AutoCompleteComboBox.java	(revision 2217)
+++ 	(revision )
@@ -1,105 +1,0 @@
-// License: GPL. Copyright 2007 by Immanuel Scholz and others
-package org.openstreetmap.josm.tools;
-
-import java.util.Collection;
-
-import javax.swing.ComboBoxModel;
-import javax.swing.DefaultComboBoxModel;
-import javax.swing.JComboBox;
-import javax.swing.text.AttributeSet;
-import javax.swing.text.BadLocationException;
-import javax.swing.text.JTextComponent;
-import javax.swing.text.PlainDocument;
-
-/**
- * @author guilhem.bonnefille@gmail.com
- */
-public class AutoCompleteComboBox extends JComboBox {
-
-    /**
-     * Auto-complete a JComboBox.
-     *
-     * Inspired by http://www.orbital-computer.de/JComboBox/
-     */
-    private class AutoCompleteComboBoxDocument extends PlainDocument {
-        private JComboBox comboBox;
-        private boolean selecting = false;
-
-        public AutoCompleteComboBoxDocument(final JComboBox comboBox) {
-            this.comboBox = comboBox;
-        }
-
-        @Override public void remove(int offs, int len) throws BadLocationException {
-            if (selecting)
-                return;
-            super.remove(offs, len);
-        }
-
-        @Override public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
-            if(selecting || (offs == 0 && str.equals(getText(0, getLength()))))
-                return;
-            boolean initial = (offs == 0 && getLength() == 0 && str.length() > 1);
-            super.insertString(offs, str, a);
-
-            // return immediately when selecting an item
-            // Note: this is done after calling super method because we need
-            // ActionListener informed
-            if (selecting)
-                return;
-
-            int size = getLength();
-            int start = offs+str.length();
-            int end = start;
-            String curText = getText(0, size);
-            // lookup and select a matching item
-            Object item = lookupItem(curText);
-            setSelectedItem(item);
-            if(initial)
-                start = 0;
-            if (item != null) {
-                String newText = item.toString();
-                if(!newText.equals(curText))
-                {
-                    selecting = true;
-                    super.remove(0, size);
-                    super.insertString(0, newText, a);
-                    selecting = false;
-                    start = size;
-                    end = getLength();
-                }
-            }
-            JTextComponent editor = (JTextComponent)comboBox.getEditor().getEditorComponent();
-            editor.setSelectionStart(start);
-            editor.setSelectionEnd(end);
-        }
-
-        private void setSelectedItem(Object item) {
-            selecting = true;
-            comboBox.setSelectedItem(item);
-            selecting = false;
-        }
-
-        private Object lookupItem(String pattern) {
-            ComboBoxModel model = comboBox.getModel();
-            for (int i = 0, n = model.getSize(); i < n; i++) {
-                Object currentItem = model.getElementAt(i);
-                if (currentItem.toString().startsWith(pattern))
-                    return currentItem;
-            }
-            return null;
-        }
-    }
-
-    public AutoCompleteComboBox() {
-        JTextComponent editor = (JTextComponent) this.getEditor().getEditorComponent();
-        editor.setDocument(new AutoCompleteComboBoxDocument(this));
-    }
-
-    public void setPossibleItems(Collection<String> elems) {
-        DefaultComboBoxModel model = (DefaultComboBoxModel)this.getModel();
-        Object oldValue = this.getEditor().getItem();
-        model.removeAllElements();
-        for (String elem : elems) model.addElement(elem);
-        this.getEditor().setItem(oldValue);
-    }
-}
