Answers for "on selected item changed listview javafx"

0

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);
    }
});
Posted by: Guest on October-17-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language