Answer the question
In order to leave comments, you need to log in
How to activate buttons when changing ROOT from STAGE?
Making forms in FXML
Switching between them
private void showStage(String fxml_source){
root = FXMLLoader.load(getClass().getResource(fxml_source));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
Platform.runLater(new Runnable() {
@Override
public void run() {
System.out.println("Search on:"+fxml_source);
for (Node node : anchorPane.getChildren()) {
System.out.println("Id: " + node.getId());
if (node instanceof Button) {
((Button)node).setDisable(false);
}
}
}
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question