Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java	(revision 15175)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java	(revision 15176)
@@ -48,4 +48,5 @@
 import org.openstreetmap.josm.gui.util.MultikeyActionsHandler;
 import org.openstreetmap.josm.gui.util.MultikeyShortcutAction;
+import org.openstreetmap.josm.gui.util.TableHelper;
 import org.openstreetmap.josm.gui.widgets.DisableShortcutsOnFocusGainedTextField;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -119,14 +120,10 @@
         userTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
         userTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-
-        userTable.getColumnModel().getColumn(0).setMaxWidth(1);
-        userTable.getColumnModel().getColumn(1).setMaxWidth(1);
-        userTable.getColumnModel().getColumn(3).setMaxWidth(1);
-        userTable.getColumnModel().getColumn(4).setMaxWidth(1);
-
-        userTable.getColumnModel().getColumn(0).setResizable(false);
-        userTable.getColumnModel().getColumn(1).setResizable(false);
-        userTable.getColumnModel().getColumn(3).setResizable(false);
-        userTable.getColumnModel().getColumn(4).setResizable(false);
+        userTable.setAutoCreateRowSorter(true);
+
+        TableHelper.adjustColumnWidth(userTable, 0, false);
+        TableHelper.adjustColumnWidth(userTable, 1, false);
+        TableHelper.adjustColumnWidth(userTable, 3, false);
+        TableHelper.adjustColumnWidth(userTable, 4, false);
 
         userTable.setDefaultRenderer(Boolean.class, new BooleanRenderer());
Index: /trunk/src/org/openstreetmap/josm/gui/util/TableHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/util/TableHelper.java	(revision 15175)
+++ /trunk/src/org/openstreetmap/josm/gui/util/TableHelper.java	(revision 15176)
@@ -6,7 +6,9 @@
 import javax.swing.JTable;
 import javax.swing.table.TableCellRenderer;
+import javax.swing.table.TableColumn;
 
 /**
  * The class that provide common JTable customization methods
+ * @since 5785
  */
 public final class TableHelper {
@@ -16,6 +18,46 @@
     }
 
+    static int getColumnHeaderWidth(JTable tbl, int col) {
+        TableColumn tableColumn = tbl.getColumnModel().getColumn(col);
+        TableCellRenderer renderer = tableColumn.getHeaderRenderer();
+
+        if (renderer == null) {
+            renderer = tbl.getTableHeader().getDefaultRenderer();
+        }
+
+        Component c = renderer.getTableCellRendererComponent(tbl, tableColumn.getHeaderValue(), false, false, -1, col);
+        return c.getPreferredSize().width;
+    }
+
+    static int getMaxWidth(JTable tbl, int col) {
+        int maxwidth = getColumnHeaderWidth(tbl, col);
+        for (int row = 0; row < tbl.getRowCount(); row++) {
+            TableCellRenderer tcr = tbl.getCellRenderer(row, col);
+            Object val = tbl.getValueAt(row, col);
+            Component comp = tcr.getTableCellRendererComponent(tbl, val, false, false, row, col);
+            maxwidth = Math.max(comp.getPreferredSize().width, maxwidth);
+        }
+        return maxwidth;
+    }
+
     /**
-     * adjust the preferred width of column col to the maximum preferred width of the cells
+     * adjust the preferred width of column col to the maximum preferred width of the cells (including header)
+     * @param tbl table
+     * @param col column index
+     * @param resizable if true, resizing is allowed
+     * @since 15176
+     */
+    public static void adjustColumnWidth(JTable tbl, int col, boolean resizable) {
+        int maxwidth = getMaxWidth(tbl, col);
+        TableColumn column = tbl.getColumnModel().getColumn(col);
+        column.setPreferredWidth(maxwidth);
+        column.setResizable(resizable);
+        if (!resizable) {
+            column.setMaxWidth(maxwidth);
+        }
+    }
+
+    /**
+     * adjust the preferred width of column col to the maximum preferred width of the cells (including header)
      * requires JTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
      * @param tbl table
@@ -24,11 +66,5 @@
      */
     public static void adjustColumnWidth(JTable tbl, int col, int maxColumnWidth) {
-        int maxwidth = 0;
-        for (int row = 0; row < tbl.getRowCount(); row++) {
-            TableCellRenderer tcr = tbl.getCellRenderer(row, col);
-            Object val = tbl.getValueAt(row, col);
-            Component comp = tcr.getTableCellRendererComponent(tbl, val, false, false, row, col);
-            maxwidth = Math.max(comp.getPreferredSize().width, maxwidth);
-        }
+        int maxwidth = getMaxWidth(tbl, col);
         tbl.getColumnModel().getColumn(col).setPreferredWidth(Math.min(maxwidth+10, maxColumnWidth));
     }
