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
Post a Comment