java Swing - RowFilter.notFilter is not working

java Swing - RowFilter.notFilter is not working

Page 1 of 1

0 Replies - 1532 Views - Last Post: 28 May 2009 - 02:49 AM Rate Topic: -----

#1 sundar.warnme  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 28-May 09

java Swing - RowFilter.notFilter is not working

Posted 28 May 2009 - 02:49 AM

Hi I'm trying to implement the robust filtering funtionality for JTable. If I enter any value in a textbox then based on it, rows will be fitlered. I too haev an another checkbox on the same screen, if an user clicks that checkbox then rows needs to be filtered based on the criteria which is not matched...

Find the part of code below...

String selectedColumn = (String)bundle.getObject((String)selectedText1);
RowFilter<DefaultTableModel, Object> rf1 =
RowFilter.regexFilter(text1, new Integer(selectedColumn).intValue());
if(getNotCheckBox().isSelected())
{
filters.add(RowFilter.notFilter(rf1));
}else
filters.add(rf1);




But this is not working as expected. Once i click the " NOT" checkbox and then enter any value no rows been displayed in the table..

Please let me know if any help or sample code for RowFilter.notFilter...

Is This A Good Question/Topic? 0
  • +

Page 1 of 1