java - TableView items are not removed but do not respond -



firstly, working on windows 7, netbeans 8, jdk 8.
have tableview containing pojo objects (not using properties).
trying implement "search while typing" strange happens.
in image can see students being displayed:
all students displayed
in next picture after search done can see problem.
first 4 students actual search results , clickable active entries in tableview.
others entries visible not responding, instead should have been removed completely. problematic search results

how works (coding part):
1. when users types 'f' function called.
2. in function create new list contain search results:
observablelist<student> subentries = fxcollections.observablearraylist();
3. add items matching criteria of search in subentries list
4. call:
5. studentstable.setitems(subentries);
erroneous result shown in picture 2.
hacks tried:
1. randombutton.fire();
2.

columnsofthetable.get(0).setvisible(false); columnsofthetable.get(0).setvisible(true); 

the above don't work.
appreciated.
thanks

this bit of guess, if using custom cells (or rows) in table, make sure updateitem(...) methods handle empty cells:

@override public void updateitem(sometype item, boolean empty) {     super.updateitem(item, boolean);     if (empty) {         settext(null);         setgraphic(null);     } else {         // configure cell...     } } 

Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -