vendredi 21 octobre 2022

How to get checked event from checkbox in tableview with map items in javafx

I just want to get checked event from checkbox within tableview that has map items. I tried some code but it does not work. Thank you.

TableColumn<Map, Boolean> tableColumn = new TableColumn<>(fieldname);
tableColumn.setCellValueFactory(new MapValueFactory<>(fieldname));
tableColumn.setCellFactory(new Callback<TableColumn<Map, Boolean>, TableCell<Map, Boolean>>() {
public TableCell<Map, Boolean> call(TableColumn<Map, Boolean> p) {
                                    return new CheckBoxTableCell<Map, Boolean>();
                                }
                            });
tableColumn.setOnEditCommit(cellEvent -> {
         // Nothing happened here

                            });



Aucun commentaire:

Enregistrer un commentaire