Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetTagsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetTagsPanel.java	(revision 8757)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetTagsPanel.java	(revision 8760)
@@ -26,5 +26,5 @@
         setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         model = new TagEditorModel();
-        TagTable tblTags = new TagTable(model);
+        TagTable tblTags = new TagTable(model, 0);
         tblTags.setEnabled(false);
         add(new JScrollPane(tblTags), BorderLayout.CENTER);
Index: trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 8757)
+++ trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 8760)
@@ -22,5 +22,5 @@
 
     /** checkbox for selecting whether an atomic upload is to be used  */
-    private final TagEditorPanel pnlTagEditor = new TagEditorPanel(null);
+    private final TagEditorPanel pnlTagEditor = new TagEditorPanel(null, null, Changeset.MAX_CHANGESET_TAG_LENGTH);
     /** the model for the changeset comment */
     private final transient ChangesetCommentModel changesetCommentModel;
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagCellEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagCellEditor.java	(revision 8757)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagCellEditor.java	(revision 8760)
@@ -30,7 +30,11 @@
     /**
      * constructor
+     * @param maxCharacters maximum number of characters allowed, 0 for unlimited
      */
-    public TagCellEditor() {
+    public TagCellEditor(final int maxCharacters) {
         editor = new AutoCompletingTextField(0, false);
+        if (maxCharacters > 0) {
+            editor.setMaxChars(maxCharacters);
+        }
         editor.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
     }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java	(revision 8757)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java	(revision 8760)
@@ -36,5 +36,5 @@
     private TagEditorModel model;
     /** the tag table */
-    private TagTable tagTable;
+    private final TagTable tagTable;
 
     private PresetListPanel presetListPanel;
@@ -48,5 +48,4 @@
     protected JPanel buildTagTableEditorPanel() {
         JPanel pnl = new JPanel();
-        tagTable = new TagTable(model);
         pnl.setLayout(new BorderLayout());
         pnl.add(new JScrollPane(tagTable), BorderLayout.CENTER);
@@ -142,5 +141,5 @@
      */
     public TagEditorPanel(PresetHandler presetHandler) {
-        this(null, presetHandler);
+        this(null, presetHandler, 0);
     }
 
@@ -150,6 +149,7 @@
      *
      * @param model the tag editor model
-     */
-    public TagEditorPanel(TagEditorModel model, PresetHandler presetHandler) {
+     * @param maxCharacters maximum number of characters allowed, 0 for unlimited
+     */
+    public TagEditorPanel(TagEditorModel model, PresetHandler presetHandler, final int maxCharacters) {
         this.model = model;
         this.presetHandler = presetHandler;
@@ -157,4 +157,5 @@
             this.model = new TagEditorModel();
         }
+        this.tagTable = new TagTable(this.model, maxCharacters);
         build();
     }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 8757)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 8760)
@@ -393,6 +393,7 @@
     /**
      * initialize the table
-     */
-    protected final void init() {
+     * @param maxCharacters maximum number of characters allowed for keys and values, 0 for unlimited
+     */
+    protected final void init(final int maxCharacters) {
         setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         setRowSelectionAllowed(true);
@@ -426,5 +427,5 @@
         // create the table cell editor and set it to key and value columns
         //
-        TagCellEditor tmpEditor = new TagCellEditor();
+        TagCellEditor tmpEditor = new TagCellEditor(maxCharacters);
         setRowHeight(tmpEditor.getEditor().getPreferredSize().height);
         setTagCellEditor(tmpEditor);
@@ -435,9 +436,10 @@
      *
      * @param model the tag editor model
-     */
-    public TagTable(TagEditorModel model) {
+     * @param maxCharacters maximum number of characters allowed for keys and values, 0 for unlimited
+     */
+    public TagTable(TagEditorModel model, final int maxCharacters) {
         super(model, new TagTableColumnModel(model.getColumnSelectionModel()), model.getRowSelectionModel());
         this.model = model;
-        init();
+        init(maxCharacters);
     }
 
