Search code examples
javaswingjtablerowfilter

I want to obtain auto filtering in JTable as in ms excel


I am using jtable to display data from ms sql server table.
I am able to sort the data using:

TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(model);    

jtable.setRowSorter(sorter);

The above sorts the data in ascending and descending order.

Is there any such simple function in java to obtain auto filtering of rows as in ms excel?

Thanks in advance


Solution

  • I have used Swing Bits Table Filtering for this: enter image description here