Reputation: 1139
I am learning how to add filter to JTable, so I found tutorials in sun website
I copied the code to netbeans, the code complied and run successfully, but when I enter "jane" in filtertext the table data just disappears instead of showing that row.
Looking for help thank you.
Upvotes: 1
Views: 87
Reputation: 7623
It's case sensitive. Type "Jane"
Good luck
UPDATE
If you want to make it case insensitive the (?i) works fine before the Regex so change this line
rf = RowFilter.regexFilter(filterText.getText(), 0);
like this.
rf = RowFilter.regexFilter("(?i)"+ filterText.getText(), 0);
Good luck!
Upvotes: 5