Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

on selected item changed listview javafx

myListView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<MyDataModel>() {

    @Override
    public void changed(ObservableValue<? extends MyDataModel> observable, MyDataModel oldValue, MyDataModel newValue) {
        // Your action here
        System.out.println("Selected item: " + newValue);
    }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #selected #item #changed #listview #javafx
ADD COMMENT
Topic
Name
3+1 =