In my Java Desktop Application I have a TableView in which I want to have a column with CheckBoxes.
I did find where this has been done http://www.jonathangiles.net/
Inspired from the previous answers, this is the shortest possible version, I think.
checkBoxColumn.setCellValueFactory(c -> {
c.getValue().booleanProperty().addListener((ch, o, n) -> {
// do something
});
return c.getValue().booleanProperty();
});
checkBoxColumn.setCellFactory(CheckBoxTableCell.forTableColumn(checkBoxColumn));