java - How to refresh TableView after deleting data from it? -


how refresh tableview after deleting data ?
(i have click on row , on deletebutton, delete)

here delete data form observable-list:

  @fxml     void delaction(actionevent event) {             fnldata.remove(index);  //fnl data observable list             finaltable.getselectionmodel().clearselection(); //finaltable ist tableview      }      public final void select() {         finaltable.getselectionmodel().selecteditemproperty().addlistener(new changelistener() {              @override             public void changed(observablevalue observable, object oldvalue, object newvalue) {                 setindex(fnldata.indexof(newvalue));                 system.out.println("ok");             }         });     } 

ok fixed it...

here code:

@fxml     void delaction(actionevent event) {             fnldata.remove(index);             finaltable.getselectionmodel().clearselection();         finaltable.getitems().clear();         finaltable.getitems().addall(fnldata);     } 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -