somya agrawal
somya agrawal

Reputation:

hiding rows from JTable

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

Upvotes: 0

Views: 3336

Answers (2)

Piotr Kochański
Piotr Kochański

Reputation: 22672

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.

Upvotes: 0

haffax
haffax

Reputation: 6008

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

Upvotes: 3

Related Questions