I am making a table with a text field below it where you can type in a word to filter the table. It works, but what I want to do is be able to filter it with the word typed
rowSorter.setStringConverter(new TableStringConverter() {
@Override
public String toString(TableModel model, int row, int column) {
return model.getValueAt(row, column).toString().toLowerCase();
}
});
rowSorter.setRowFilter(RowFilter.regexFilter(jtfFilter.getText().toLowerCase()));
Add the standard regex case-insensitivity flag:
rowSorter.setRowFilter(RowFilter.regexFilter("(?i)" + text));
I've tested this with your SSCCE (thanks for providing that) and it works.