public void newFilter() {
RowFilter<ListTable, Object> rf = null;
//If current expression doesn't parse, don't update.
try {
rf = RowFilter.regexFilter(filterText.getText(), 0);
} catch (java.util.regex.PatternSyntaxException e) {
return;
}
sorter.setRowFilter(rf);
}
I'm using this filter from http://docs.oracle.com/javase/tutorial/uiswing/components/table.html#sorting But this filter seems only able to filter int component on my table (Apart from the first col, all others are strings) . I simply want to create a Filter that leave any row with entered text. I'm relatively new to the language, Thanks very much for your help!
https://i.stack.imgur.com/WxOmz.jpg Here is 3 Image