Question : javafx tableview row change listener
Answered by : confused-cheetah-0mhjpq6whezg
tableview1.getSelectionModel().selectedItemProperty().addListener((obs, oldSelection, newSelection) -> { if (newSelection != null) { tableview2.getSelectionModel().clearSelection(); }
});
tableview2.getSelectionModel().selectedItemProperty().addListener((obs, oldSelection, newSelection) -> { if (newSelection != null) { tableview1.getSelectionModel().clearSelection(); }
});
Source : https://stackoverflow.com/questions/26424769/javafx8-how-to-create-listener-for-selection-of-row-in-tableview | Last Update : Thu, 28 Jul 22