I am coding a program which applies 2 filters to the JTable
and then give me the results.
public void rowF(String one, String two){
RowFilter<DefaultTableModel, Object> rf = null;
List<RowFilter<Object,Object>> filters = new ArrayList<RowFilter<Object,Object>>(2);
filters.add(RowFilter.regexFilter(one, 0));
filters.add(RowFilter.regexFilter(two, 1));
rf = RowFilter.andFilter(filters);
}
This as I understand is the method to do so. But the problem is when I am calling it, it's not showing the result.
This is the code of the button - Search.
String quer = jtxtsearch.getText();
String query = jtxtsearch2.getText();
String search = (String)jcbox.getSelectedItem();
String perch = (String)jcbox2.getSelectedItem();
if (search.equals("ID")){
if (perch.equals("Date")){
rowF(quer,query);
}
}