Source:
private JPanel createFilteringPanel() { JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT)); panel.setBorder(BorderFactory.createEmptyBorder()); final JTextField filterField = new JTextField(); filterField.setColumns(10); final JComboBox<ActionCategory> combo = new JComboBox<>(); combo.addItem(ActionCategory.ALL); for (ActionCategory category : ActionProperties.getActionCategory()) combo.addItem(category); final ActionListener filterActionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final ActionCategory selectedActionCategory = (ActionCategory) combo.getSelectedItem(); String f = filterField.getText().toLowerCase().trim(); String[] words = f.split("\\s+"); shortcutsTable.updateModel(new ShortcutsTable.ActionFilter() { @Override public boolean accept(String actionId, String rowAsText) { if (selectedActionCategory != null && !selectedActionCategory.contains(actionId)) { return false; } if (words.length == 0) { return true; } for (String word : words) { if (!rowAsText.contains(word)) { return false; } } return true; } }); tooltipBar.showDefaultMessage(); if (e.getSource() == filterField) { filterField.requestFocus(); } } }; combo.addActionListener(filterActionListener); combo.setSelectedIndex(0); DeferredDocumentListener debounceListener = new DeferredDocumentListener(250, filterActionListener, true); filterField.getDocument().addDocumentListener(debounceListener); filterField.addFocusListener(new FocusListener() { @Override public void focusGained(FocusEvent e) { debounceListener.start(); } @Override public void focusLost(FocusEvent e) { debounceListener.stop(); } }); panel.add(new JLabel(Translator.get("shortcuts_panel" + ".filter") + ":")); panel.add(filterField); panel.add(new JLabel(Translator.get("shortcuts_panel" + ".show") + ":")); panel.add(combo); return panel; }

Target:
private JPanel createFilteringPanel() { JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT)); panel.setBorder(BorderFactory.createEmptyBorder()); final JTextField filterField = new JTextField(); filterField.setColumns(10); final JComboBox<ActionCategory> combo = new JComboBox<>(); combo.addItem(ActionCategory.ALL); for(ActionCategory category : ActionProperties.getActionCategory()) combo.addItem(category); final ActionListener filterActionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final ActionCategory selectedActionCategory = (ActionCategory) combo.getSelectedItem(); String f = filterField.getText().toLowerCase().trim(); String[] words = f.split("\\s+"); shortcutsTable.updateModel(new ShortcutsTable.ActionFilter() { @Override public boolean accept(String actionId, String rowAsText) { if (selectedActionCategory != null && !selectedActionCategory.contains(actionId)) { return false; } if (words.length == 0) { return true; } for (String word : words) { if (!rowAsText.contains(word)) { return false; } } return true; } }); tooltipBar.showDefaultMessage(); if (e.getSource() == filterField) { filterField.requestFocus(); } } }; combo.addActionListener(filterActionListener); combo.setSelectedIndex(0); DeferredDocumentListener debounceListener = new DeferredDocumentListener(250, filterActionListener); filterField.getDocument().addDocumentListener(debounceListener); filterField.addFocusListener(new FocusListener() { @Override public void focusGained(FocusEvent e) { debounceListener.start(); } @Override public void focusLost(FocusEvent e) { debounceListener.stop(); } }); panel.add(new JLabel(Translator.get("shortcuts_panel" + ".filter") + ":")); panel.add(filterField); panel.add(new JLabel(Translator.get("shortcuts_panel" + ".show") + ":")); panel.add(combo); return panel; }