tags:

views:

305

answers:

2

I want to hide those rows from JTable containg a particular string....please help me for this..

+3  A: 

You can use javax.swing.RowFilter for that. Detailed usage instructions are in the linked API docs.

haffax
You'll need to specify a TableRowSorter (use setRowSorter from JTable) and set your RowFilter of the TableRowSorter per setRowFilter
HerdplattenToni
A: 

Since Java 1.6 there is a ready to use RowFilter version that takes regexp as a parameter, so that would be the easiest approach in your case.

Have a look at that section of Swing tutorial and RowFilter Javadoc.

Piotr Kochański