📅  最后修改于: 2022-03-11 14:52:03.489000             🧑  作者: Mango
myListView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {
@Override
public void changed(ObservableValue extends MyDataModel> observable, MyDataModel oldValue, MyDataModel newValue) {
// Your action here
System.out.println("Selected item: " + newValue);
}
});