I have a method that cleans my components, however, it can not clean components that are within Tab
.
I was trying to apply it as follows:
if (fieldValue instanceof Tab) {
for (Tab tab : ((Tab) fieldValue).getTabPane().getTabs()) {
if (tab instanceof Tab) {
// ((Tab) fieldValue).getTabPane().getContentBias().getChildrenUnmodifiable().clear();
((Tab) fieldValue).getTabPane().getTabs().clear();
}
}
What happens is that I have not been able to get these components, and in my attempt, it ends up removing all tabs. Does anyone have any suggestions, some way to give getComponenets()
or something like this?
Detail, that fieldValue
has all components instantiated and Tab type.