Error when add MFXCheckTreeItem into MFXCheckTreeView
Closed this issue · 0 comments
thucnobita97 commented
@FXML
private MFXCheckTreeView checkTreeView;
MFXCheckTreeItem root = new MFXCheckTreeItem("Restaurants");
root.setExpanded(true);
Model.restaurants.forEach(res -> {
root.getChildrenUnmodifiable().add(new MFXCheckTreeItem(res.getName()));
});
checkTreeView = new MFXCheckTreeView<>(root);
[Error after]: Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Children: child node is null: parent = StackPane[id=contentPane]