Index: core/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- core/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 5367)
+++ core/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(working copy)
@@ -6,6 +6,7 @@
 
 import java.awt.BorderLayout;
 import java.awt.Component;
+import java.awt.Cursor;
 import java.awt.Dimension;
 import java.awt.Font;
 import java.awt.GridBagLayout;
@@ -18,7 +19,6 @@
 import java.awt.event.ActionListener;
 import java.awt.event.FocusAdapter;
 import java.awt.event.FocusEvent;
-import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
@@ -34,6 +34,7 @@
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
@@ -47,7 +48,6 @@
 import javax.swing.Action;
 import javax.swing.Box;
 import javax.swing.DefaultListCellRenderer;
-import javax.swing.InputMap;
 import javax.swing.JComboBox;
 import javax.swing.JComponent;
 import javax.swing.JDialog;
@@ -61,7 +61,6 @@
 import javax.swing.JTable;
 import javax.swing.KeyStroke;
 import javax.swing.ListSelectionModel;
-import javax.swing.SwingUtilities;
 import javax.swing.event.ListSelectionEvent;
 import javax.swing.event.ListSelectionListener;
 import javax.swing.event.PopupMenuListener;
@@ -456,6 +455,9 @@
 
     private static String lastAddKey = null;
     private static String lastAddValue = null;
+    // LRU cache for recently added tags (http://java-planet.blogspot.com/2005/08/how-to-set-up-simple-lru-cache-using.html) 
+    private static final Map<Tag, Void> recentTags = new LinkedHashMap<Tag, Void>(5, 1.1f, true);
+    
     /**
      * Open the add selection dialog and add a new key/value to the table (and
      * to the dataset, of course).
@@ -466,10 +468,10 @@
         Collection<OsmPrimitive> sel = ds.getSelected();
         if (sel.isEmpty()) return;
 
-        JPanel p = new JPanel(new BorderLayout());
+        JPanel p = new JPanel(new GridBagLayout());
         p.add(new JLabel("<html>"+trn("This will change up to {0} object.",
                 "This will change up to {0} objects.", sel.size(),sel.size())
-                +"<br><br>"+tr("Please select a key")), BorderLayout.NORTH);
+                +"<br><br>"+tr("Please select a key")), GBC.eol());
         final AutoCompletingComboBox keys = new AutoCompletingComboBox();
         AutoCompletionManager autocomplete = Main.main.getEditLayer().data.getAutoCompletionManager();
         List<AutoCompletionListItem> keyList = autocomplete.getKeys();
@@ -497,14 +499,12 @@
         keys.setPossibleACItems(keyList);
         keys.setEditable(true);
 
-        p.add(keys, BorderLayout.CENTER);
+        p.add(keys, GBC.eop().fill());
 
-        JPanel p2 = new JPanel(new BorderLayout());
-        p.add(p2, BorderLayout.SOUTH);
-        p2.add(new JLabel(tr("Please select a value")), BorderLayout.NORTH);
+        p.add(new JLabel(tr("Please select a value")), GBC.eol());
         final AutoCompletingComboBox values = new AutoCompletingComboBox();
         values.setEditable(true);
-        p2.add(values, BorderLayout.CENTER);
+        p.add(values, GBC.eop().fill());
         if (itemToSelect != null) {
             keys.setSelectedItem(itemToSelect);
             /* don't add single chars, as they are no properly selected */
@@ -512,7 +512,29 @@
                 values.setSelectedItem(lastAddValue);
             }
         }
+        
+        if (!recentTags.isEmpty()) { 
+            p.add(new JLabel(tr("Recently added tags")), GBC.eol()); 
+        }
 
+        int count = 1;
+        for (final Tag t : recentTags.keySet()) {
+            final JLabel l = new JLabel("<html>" 
+                + "<style>td{border:1px solid gray; font-weight:normal;}</style>" 
+                + "<table><tr><td>" + t.toString() + "</td></tr></table></html>");
+            l.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
+            l.setToolTipText(tr("Click to use this tag again"));
+            l.addMouseListener(new MouseAdapter() { 
+                @Override 
+                public void mouseClicked(MouseEvent e) { 
+                    keys.getEditor().setItem(t.getKey()); 
+                    values.getEditor().setItem(t.getValue()); 
+                } 
+            });
+            p.add(new JLabel(Integer.toString(count++)+". "));
+            p.add(l, GBC.eol());
+        } 
+
         FocusAdapter focus = addFocusAdapter(-1, keys, values, autocomplete, defaultACItemComparator);
         // fire focus event in advance or otherwise the popup list will be too small at first
         focus.focusGained(null);
@@ -544,6 +566,7 @@
             return;
         lastAddKey = key;
         lastAddValue = value;
+        recentTags.put(new Tag(key, value), null);
         Main.main.undoRedo.add(new ChangePropertyCommand(sel, key, value));
         btnAdd.requestFocusInWindow();
     }
