Index: /trunk/src/org/openstreetmap/josm/gui/preferences/PrefJPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/PrefJPanel.java	(revision 4913)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/PrefJPanel.java	(revision 4914)
@@ -9,4 +9,5 @@
 
 import java.awt.event.KeyEvent;
+import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.HashMap;
@@ -14,13 +15,5 @@
 
 import java.util.regex.PatternSyntaxException;
-import javax.swing.AbstractAction;
-import javax.swing.BorderFactory;
-import javax.swing.JEditorPane;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextField;
-import javax.swing.ListSelectionModel;
-import javax.swing.RowFilter;
+import javax.swing.*;
 import javax.swing.event.DocumentEvent;
 import javax.swing.event.DocumentListener;
@@ -38,5 +31,5 @@
  * If someone wants to merge it with ShortcutPreference.java, feel free.
  */
-public class PrefJPanel extends javax.swing.JPanel {
+public class PrefJPanel extends JPanel {
 
     // table of shortcuts
@@ -63,16 +56,16 @@
         tr("disabled"),
         tr("no modifier"),
-        KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[2]).getModifiers()),
-        KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[3]).getModifiers()),
-        KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[4]).getModifiers()),
-        KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[5]).getModifiers()),
-        KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[6]).getModifiers()),
-        KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[7]).getModifiers()),
-        KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[8]).getModifiers()),
-        KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[9]).getModifiers()),
-        KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[10]).getModifiers()),
-        KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[11]).getModifiers()),
-        KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[12]).getModifiers()),
-        KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[13]).getModifiers())
+        KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[2]).getModifiers()),
+        KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[3]).getModifiers()),
+        KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[4]).getModifiers()),
+        KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[5]).getModifiers()),
+        KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[6]).getModifiers()),
+        KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[7]).getModifiers()),
+        KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[8]).getModifiers()),
+        KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[9]).getModifiers()),
+        KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[10]).getModifiers()),
+        KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[11]).getModifiers()),
+        KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[12]).getModifiers()),
+        KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, modifInts[13]).getModifiers())
     };
     // this are the display(!) texts for the checkboxes. Let the JVM do the i18n for us <g>.
@@ -82,13 +75,13 @@
     // usually matches the keyboard. This even works with my English Windows and my German
     // keyboard.
-    private static String SHIFT = KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.SHIFT_DOWN_MASK).getModifiers());
-    private static String CTRL  = KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.CTRL_DOWN_MASK).getModifiers());
-    private static String ALT   = KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.ALT_DOWN_MASK).getModifiers());
-    private static String META  = KeyEvent.getKeyModifiersText(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.META_DOWN_MASK).getModifiers());
+    private static String SHIFT = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.SHIFT_DOWN_MASK).getModifiers());
+    private static String CTRL  = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.CTRL_DOWN_MASK).getModifiers());
+    private static String ALT   = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.ALT_DOWN_MASK).getModifiers());
+    private static String META  = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.META_DOWN_MASK).getModifiers());
 
     // A list of keys to present the user. Sadly this really is a list of keys Java knows about,
     // not a list of real physical keys. If someone knows how to get that list?
     private static Map<Integer, String> keyList = setKeyList();
-
+    
     private static Map<Integer, String> setKeyList() {
         Map<Integer, String> list = new LinkedHashMap<Integer, String>();
@@ -104,4 +97,28 @@
         return list;
     }
+    
+    private JComboBox bxPrim1 = new JComboBox();
+    private JComboBox bxPrim2 = new JComboBox();
+    private JComboBox bxPrim3 = new JComboBox();
+    private JComboBox bxPrim4 = new JComboBox();
+    private JComboBox bxSec1 = new JComboBox();
+    private JComboBox bxSec2 = new JComboBox();
+    private JComboBox bxSec3 = new JComboBox();
+    private JComboBox bxSec4 = new JComboBox();
+    private JComboBox bxTer1 = new JComboBox();
+    private JComboBox bxTer2 = new JComboBox();
+    private JComboBox bxTer3 = new JComboBox();
+    private JComboBox bxTer4 = new JComboBox();
+    private JCheckBox cbAlt = new JCheckBox();
+    private JCheckBox cbCtrl = new JCheckBox();
+    private JCheckBox cbMeta = new JCheckBox();
+    private JCheckBox cbShift = new JCheckBox();
+    private JCheckBox cbDefault = new JCheckBox();
+    private JCheckBox cbDisable = new JCheckBox();
+    private JComboBox tfKey = new JComboBox();
+    
+    JTable shortcutTable = new JTable();
+    
+    private JTextField filterField = new JTextField();
 
     /** Creates new form prefJPanel */
@@ -116,57 +133,27 @@
         // Did I mention auto-generated? That's the reason we
         // have lots of properties here and not some arrays...
-        prefTabPane = new javax.swing.JTabbedPane();
-        shortcutTab = new javax.swing.JPanel();
-        listPane = new javax.swing.JPanel();
-        listScrollPane = new javax.swing.JScrollPane();
-        shortcutTable = new javax.swing.JTable();
-        shortcutEditPane = new javax.swing.JPanel();
-        cbDefault = new javax.swing.JCheckBox();
-        jLabel4 = new javax.swing.JLabel();
-        cbShift = new javax.swing.JCheckBox();
-        cbDisable = new javax.swing.JCheckBox();
-        cbCtrl = new javax.swing.JCheckBox();
-        tfKeyLabel = new javax.swing.JLabel();
-        cbAlt = new javax.swing.JCheckBox();
-        tfKey = new javax.swing.JComboBox();
-        cbMeta = new javax.swing.JCheckBox();
-        jLabel6 = new javax.swing.JLabel();
-        modifierTab = new javax.swing.JPanel();
-        editGroupPane = new javax.swing.JPanel();
-        jLabel1 = new javax.swing.JLabel();
-        bxPrim1 = new javax.swing.JComboBox();
-        jLabel2 = new javax.swing.JLabel();
-        bxSec1 = new javax.swing.JComboBox();
-        jLabel3 = new javax.swing.JLabel();
-        bxTer1 = new javax.swing.JComboBox();
-        menuGroupPane = new javax.swing.JPanel();
-        jLabel7 = new javax.swing.JLabel();
-        bxPrim2 = new javax.swing.JComboBox();
-        jLabel8 = new javax.swing.JLabel();
-        bxSec2 = new javax.swing.JComboBox();
-        jLabel9 = new javax.swing.JLabel();
-        bxTer2 = new javax.swing.JComboBox();
-        hotkeyGroupPane = new javax.swing.JPanel();
-        jLabel10 = new javax.swing.JLabel();
-        bxPrim3 = new javax.swing.JComboBox();
-        jLabel11 = new javax.swing.JLabel();
-        bxSec3 = new javax.swing.JComboBox();
-        jLabel12 = new javax.swing.JLabel();
-        bxTer3 = new javax.swing.JComboBox();
-        subwindowGroupPane = new javax.swing.JPanel();
-        jLabel13 = new javax.swing.JLabel();
-        bxPrim4 = new javax.swing.JComboBox();
-        jLabel14 = new javax.swing.JLabel();
-        bxSec4 = new javax.swing.JComboBox();
-        jLabel15 = new javax.swing.JLabel();
-        bxTer4 = new javax.swing.JComboBox();
-        infoTab = new javax.swing.JPanel();
-        cbAction action = new cbAction(this);
-        bxAction action2 = new bxAction();
-
-        setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.Y_AXIS));
+        
+        // r4914 - autogenerated code rearranged manually 
+        
+        JPanel editGroupPane = new JPanel();
+        JPanel hotkeyGroupPane = new JPanel();
+
+        JPanel listPane = new JPanel();
+        JScrollPane listScrollPane = new JScrollPane();
+        JPanel menuGroupPane = new JPanel();
+        JPanel modifierTab = new JPanel();
+        JTabbedPane prefTabPane = new JTabbedPane();
+        JPanel shortcutEditPane = new JPanel();
+        JPanel shortcutTab = new JPanel();
+        JPanel subwindowGroupPane = new JPanel();
+        JPanel infoTab = new JPanel();
+
+        CbAction action = new CbAction(this);
+        BxAction action2 = new BxAction();
+
+        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
 
         // If someone wants to move this text into some resource, feel free.
-        infoTab.setLayout(new javax.swing.BoxLayout(shortcutTab, javax.swing.BoxLayout.Y_AXIS));
+        infoTab.setLayout(new BoxLayout(shortcutTab, BoxLayout.Y_AXIS));
         JEditorPane editor = new JEditorPane();
         editor.setEditable(false);
@@ -196,5 +183,5 @@
         prefTabPane.addTab(tr("Read First"), new JScrollPane(editor));
 
-        shortcutTab.setLayout(new javax.swing.BoxLayout(shortcutTab, javax.swing.BoxLayout.Y_AXIS));
+        shortcutTab.setLayout(new BoxLayout(shortcutTab, BoxLayout.Y_AXIS));
 
         shortcutTab.add(buildFilterPanel());
@@ -203,7 +190,7 @@
         // This is the list of shortcuts:
         shortcutTable.setModel(model);
-        shortcutTable.getSelectionModel().addListSelectionListener(new cbAction(this));
+        shortcutTable.getSelectionModel().addListSelectionListener(new CbAction(this));
         //shortcutTable.setFillsViewportHeight(true); Java 1.6
-        shortcutTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
+        shortcutTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
         shortcutTable.setAutoCreateRowSorter(true);
         listScrollPane.setViewportView(shortcutTable);
@@ -218,38 +205,29 @@
         cbDefault.setAction(action);
         cbDefault.setText(tr("Use default"));
-        shortcutEditPane.add(cbDefault);
-
-        shortcutEditPane.add(jLabel4);
-
         cbShift.setAction(action);
         cbShift.setText(SHIFT); // see above for why no tr()
-        shortcutEditPane.add(cbShift);
-
         cbDisable.setAction(action);
         cbDisable.setText(tr("Disable"));
-        shortcutEditPane.add(cbDisable);
-
         cbCtrl.setAction(action);
         cbCtrl.setText(CTRL); // see above for why no tr()
-        shortcutEditPane.add(cbCtrl);
-
-        tfKeyLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
-        tfKeyLabel.setText(tr("Key:"));
-        shortcutEditPane.add(tfKeyLabel);
-
         cbAlt.setAction(action);
         cbAlt.setText(ALT); // see above for why no tr()
-        shortcutEditPane.add(cbAlt);
-
         tfKey.setAction(action);
-        tfKey.setModel(new javax.swing.DefaultComboBoxModel(keyList.values().toArray()));
-        shortcutEditPane.add(tfKey);
-
+        tfKey.setModel(new DefaultComboBoxModel(keyList.values().toArray()));
         cbMeta.setAction(action);
         cbMeta.setText(META); // see above for why no tr()
+        
+        
+        shortcutEditPane.add(cbDefault);
+        shortcutEditPane.add(new JLabel());
+        shortcutEditPane.add(cbShift);
+        shortcutEditPane.add(cbDisable);
+        shortcutEditPane.add(cbCtrl);
+        shortcutEditPane.add(new JLabel(tr("Key:"), SwingConstants.LEFT));
+        shortcutEditPane.add(cbAlt);
+        shortcutEditPane.add(tfKey);
         shortcutEditPane.add(cbMeta);
 
-        jLabel6.setText(tr("Attention: Use real keyboard keys only!"));
-        shortcutEditPane.add(jLabel6);
+        shortcutEditPane.add(new JLabel(tr("Attention: Use real keyboard keys only!")));
 
         action.actionPerformed(null); // init checkboxes
@@ -264,107 +242,51 @@
         JScrollPane modifierScroller = new JScrollPane(modifierTab);
 
-        editGroupPane.setBorder(javax.swing.BorderFactory.createTitledBorder(tr("Edit Shortcuts")));
+        editGroupPane.setBorder(BorderFactory.createTitledBorder(tr("Edit Shortcuts")));
         editGroupPane.setLayout(new java.awt.GridLayout(3, 5));
-
-        jLabel1.setText(tr("Primary modifier:"));
-        editGroupPane.add(jLabel1);
-
-        bxPrim1.setModel(new javax.swing.DefaultComboBoxModel(modifList));
+        
+        JComboBox[] bxArray = new JComboBox[] {
+                    bxPrim1,bxSec1,bxTer1,bxPrim2,bxSec2,bxTer2,
+                    bxPrim3,bxSec3,bxTer3,bxPrim4,bxSec4,bxTer4};
+        for (JComboBox bxi: bxArray) bxi.setModel(new DefaultComboBoxModel(modifList)); 
+        
+        editGroupPane.add(new JLabel(tr("Primary modifier:")));
         editGroupPane.add(bxPrim1);
-
-        jLabel2.setText(tr("Secondary modifier:"));
-        editGroupPane.add(jLabel2);
-
-        bxSec1.setModel(new javax.swing.DefaultComboBoxModel(modifList));
+        editGroupPane.add(new JLabel(tr("Secondary modifier:")));
         editGroupPane.add(bxSec1);
-
-        jLabel3.setText(tr("Tertiary modifier:"));
-        editGroupPane.add(jLabel3);
-
-        bxTer1.setModel(new javax.swing.DefaultComboBoxModel(modifList));
+        editGroupPane.add(new JLabel(tr("Tertiary modifier:")));
         editGroupPane.add(bxTer1);
-
         modifierTab.add(editGroupPane);
 
-        menuGroupPane.setBorder(javax.swing.BorderFactory.createTitledBorder(tr("Menu Shortcuts")));
+        menuGroupPane.setBorder(BorderFactory.createTitledBorder(tr("Menu Shortcuts")));
         menuGroupPane.setLayout(new java.awt.GridLayout(3, 5));
-
-        jLabel7.setText(tr("Primary modifier:"));
-        menuGroupPane.add(jLabel7);
-
-        bxPrim2.setModel(new javax.swing.DefaultComboBoxModel(modifList));
+        menuGroupPane.add(new JLabel(tr("Primary modifier:")));
         menuGroupPane.add(bxPrim2);
-
-        jLabel8.setText(tr("Secondary modifier:"));
-        menuGroupPane.add(jLabel8);
-
-        bxSec2.setModel(new javax.swing.DefaultComboBoxModel(modifList));
+        menuGroupPane.add(new JLabel(tr("Secondary modifier:")));
         menuGroupPane.add(bxSec2);
-
-        jLabel9.setText(tr("Tertiary modifier:"));
-        menuGroupPane.add(jLabel9);
-
-        bxTer2.setModel(new javax.swing.DefaultComboBoxModel(modifList));
+        menuGroupPane.add(new JLabel(tr("Tertiary modifier:")));
         menuGroupPane.add(bxTer2);
-
         modifierTab.add(menuGroupPane);
 
-        hotkeyGroupPane.setBorder(javax.swing.BorderFactory.createTitledBorder(tr("Hotkey Shortcuts")));
+        hotkeyGroupPane.setBorder(BorderFactory.createTitledBorder(tr("Hotkey Shortcuts")));
         hotkeyGroupPane.setLayout(new java.awt.GridLayout(3, 5));
-
-        jLabel10.setText(tr("Primary modifier:"));
-        hotkeyGroupPane.add(jLabel10);
-
-        bxPrim3.setModel(new javax.swing.DefaultComboBoxModel(modifList));
+        hotkeyGroupPane.add(new JLabel(tr("Primary modifier:")));
         hotkeyGroupPane.add(bxPrim3);
-
-        jLabel11.setText(tr("Secondary modifier:"));
-        hotkeyGroupPane.add(jLabel11);
-
-        bxSec3.setModel(new javax.swing.DefaultComboBoxModel(modifList));
+        hotkeyGroupPane.add(new JLabel((tr("Secondary modifier:"))));
         hotkeyGroupPane.add(bxSec3);
-
-        jLabel12.setText(tr("Tertiary modifier:"));
-        hotkeyGroupPane.add(jLabel12);
-
-        bxTer3.setModel(new javax.swing.DefaultComboBoxModel(modifList));
+        hotkeyGroupPane.add(new JLabel(tr("Tertiary modifier:")));
         hotkeyGroupPane.add(bxTer3);
-
         modifierTab.add(hotkeyGroupPane);
 
-        subwindowGroupPane.setBorder(javax.swing.BorderFactory.createTitledBorder(tr("Subwindow Shortcuts")));
+        subwindowGroupPane.setBorder(BorderFactory.createTitledBorder(tr("Subwindow Shortcuts")));
         subwindowGroupPane.setLayout(new java.awt.GridLayout(3, 5));
-
-        jLabel13.setText(tr("Primary modifier:"));
-        subwindowGroupPane.add(jLabel13);
-
-        bxPrim4.setModel(new javax.swing.DefaultComboBoxModel(modifList));
+        subwindowGroupPane.add(new JLabel(tr("Primary modifier:")));
         subwindowGroupPane.add(bxPrim4);
-
-        jLabel14.setText(tr("Secondary modifier:"));
-        subwindowGroupPane.add(jLabel14);
-
-        bxSec4.setModel(new javax.swing.DefaultComboBoxModel(modifList));
+        subwindowGroupPane.add(new JLabel(tr("Secondary modifier:")));
         subwindowGroupPane.add(bxSec4);
-
-        jLabel15.setText(tr("Tertiary modifier:"));
-        subwindowGroupPane.add(jLabel15);
-
-        bxTer4.setModel(new javax.swing.DefaultComboBoxModel(modifList));
+        subwindowGroupPane.add(new JLabel(tr("Tertiary modifier:")));
         subwindowGroupPane.add(bxTer4);
 
         initbx();
-        bxPrim1.setAction(action2);
-        bxSec1.setAction(action2);
-        bxTer1.setAction(action2);
-        bxPrim2.setAction(action2);
-        bxSec2.setAction(action2);
-        bxTer2.setAction(action2);
-        bxPrim3.setAction(action2);
-        bxSec3.setAction(action2);
-        bxTer3.setAction(action2);
-        bxPrim4.setAction(action2);
-        bxSec4.setAction(action2);
-        bxTer4.setAction(action2);
+        for (JComboBox bxi: bxArray) bxi.setAction(action2); 
 
         modifierTab.add(subwindowGroupPane);
@@ -389,5 +311,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(filterField = new JTextField(), gc);
+        pnl.add(filterField, gc);
         filterField.setToolTipText(tr("Enter a search expression"));
         SelectAllOnFocusGainedDecorator.decorate(filterField);
@@ -395,4 +317,13 @@
         pnl.setMaximumSize(new Dimension(300,10));
         return pnl;
+    }
+    
+    private void disableAllModifierCheckboxes() {
+        cbDefault.setEnabled(false);
+        cbDisable.setEnabled(false);
+        cbShift.setEnabled(false);
+        cbCtrl.setEnabled(false);
+        cbAlt.setEnabled(false);
+        cbMeta.setEnabled(false);
     }
 
@@ -405,7 +336,7 @@
     // even have some duplicated code. Feel free to refactor, If you have
     // more expirience with GUI coding than I have.
-    private class cbAction extends AbstractAction implements ListSelectionListener {
+    private class CbAction extends AbstractAction implements ListSelectionListener {
         private PrefJPanel panel;
-        public cbAction (PrefJPanel panel) {
+        public CbAction (PrefJPanel panel) {
             this.panel = panel;
         }
@@ -427,10 +358,5 @@
                 }
                 if (!sc.isChangeable()) {
-                    panel.cbDefault.setEnabled(false);
-                    panel.cbDisable.setEnabled(false);
-                    panel.cbShift.setEnabled(false);
-                    panel.cbCtrl.setEnabled(false);
-                    panel.cbAlt.setEnabled(false);
-                    panel.cbMeta.setEnabled(false);
+                    disableAllModifierCheckboxes();
                     panel.tfKey.setEnabled(false);
                 } else {
@@ -439,10 +365,5 @@
                 }
             } else {
-                panel.cbDefault.setEnabled(false);
-                panel.cbDisable.setEnabled(false);
-                panel.cbShift.setEnabled(false);
-                panel.cbCtrl.setEnabled(false);
-                panel.cbAlt.setEnabled(false);
-                panel.cbMeta.setEnabled(false);
+                panel.disableAllModifierCheckboxes();
                 panel.tfKey.setEnabled(false);
             }
@@ -483,10 +404,5 @@
                 panel.tfKey.setEnabled(state);
             } else {
-                panel.cbDefault.setEnabled(false);
-                panel.cbDisable.setEnabled(false);
-                panel.cbShift.setEnabled(false);
-                panel.cbCtrl.setEnabled(false);
-                panel.cbAlt.setEnabled(false);
-                panel.cbMeta.setEnabled(false);
+                panel.disableAllModifierCheckboxes();
                 panel.tfKey.setEnabled(false);
             }
@@ -495,5 +411,5 @@
 
     // this handles the modifier groups
-    private class bxAction extends javax.swing.AbstractAction {
+    private class BxAction extends AbstractAction {
         public void actionPerformed(java.awt.event.ActionEvent e) {
             Main.pref.putInteger("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_EDIT),    modifInts[bxPrim1.getSelectedIndex()]);
@@ -533,5 +449,5 @@
         setBx(bxTer4,  groups, Shortcut.GROUPS_ALT2   +Shortcut.GROUP_LAYER);
     }
-    private void setBx(javax.swing.JComboBox bx, HashMap<Integer, Integer> groups, int key) {
+    private void setBx(JComboBox bx, HashMap<Integer, Integer> groups, int key) {
         int target = Main.pref.getInteger("shortcut.groups."+key, groups.get(key));
         for (int i = 0; i < modifInts.length; i++) {
@@ -542,51 +458,4 @@
     }
 
-    private javax.swing.JComboBox bxPrim1;
-    private javax.swing.JComboBox bxPrim2;
-    private javax.swing.JComboBox bxPrim3;
-    private javax.swing.JComboBox bxPrim4;
-    private javax.swing.JComboBox bxSec1;
-    private javax.swing.JComboBox bxSec2;
-    private javax.swing.JComboBox bxSec3;
-    private javax.swing.JComboBox bxSec4;
-    private javax.swing.JComboBox bxTer1;
-    private javax.swing.JComboBox bxTer2;
-    private javax.swing.JComboBox bxTer3;
-    private javax.swing.JComboBox bxTer4;
-    private javax.swing.JCheckBox cbAlt;
-    private javax.swing.JCheckBox cbCtrl;
-    private javax.swing.JCheckBox cbDefault;
-    private javax.swing.JCheckBox cbDisable;
-    private javax.swing.JCheckBox cbMeta;
-    private javax.swing.JCheckBox cbShift;
-    private javax.swing.JPanel editGroupPane;
-    private javax.swing.JPanel hotkeyGroupPane;
-    private javax.swing.JLabel jLabel1;
-    private javax.swing.JLabel jLabel10;
-    private javax.swing.JLabel jLabel11;
-    private javax.swing.JLabel jLabel12;
-    private javax.swing.JLabel jLabel13;
-    private javax.swing.JLabel jLabel14;
-    private javax.swing.JLabel jLabel15;
-    private javax.swing.JLabel jLabel2;
-    private javax.swing.JLabel jLabel3;
-    private javax.swing.JLabel jLabel4;
-    private javax.swing.JLabel jLabel6;
-    private javax.swing.JLabel jLabel7;
-    private javax.swing.JLabel jLabel8;
-    private javax.swing.JLabel jLabel9;
-    private javax.swing.JPanel listPane;
-    private javax.swing.JScrollPane listScrollPane;
-    private javax.swing.JPanel menuGroupPane;
-    private javax.swing.JPanel modifierTab;
-    private javax.swing.JTabbedPane prefTabPane;
-    private javax.swing.JPanel shortcutEditPane;
-    private javax.swing.JPanel shortcutTab;
-    private javax.swing.JTable shortcutTable;
-    private javax.swing.JPanel subwindowGroupPane;
-    private javax.swing.JComboBox tfKey;
-    private javax.swing.JLabel tfKeyLabel;
-    private javax.swing.JPanel infoTab;
-    private JTextField filterField;
     
      class FilterFieldAdapter implements DocumentListener {
@@ -597,6 +466,14 @@
                 final TableRowSorter<TableModel> sorter =
                     ((TableRowSorter<TableModel> )shortcutTable.getRowSorter());
-                if (expr==null) sorter.setRowFilter(null);
-                    else  sorter.setRowFilter(  RowFilter.regexFilter(expr) );
+                if (expr == null) {
+                    sorter.setRowFilter(null);
+                } else {
+                    // split search string on whitespace, do case-insensitive AND search 
+                    ArrayList<RowFilter<Object, Object>> andFilters = new ArrayList<RowFilter<Object, Object>>();
+                    for (String word : expr.split("\\s+")) {
+                        andFilters.add(RowFilter.regexFilter("(?i)" + word));
+                    }
+                    sorter.setRowFilter(RowFilter.andFilter(andFilters));
+                }
             }
             catch (PatternSyntaxException ex) { }
