How can I perform a case-insensitive filter on a JTable?
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.