To familiarize myself with the scene builder I added a linechart and two numberaxis as nodes in a stackpane with the scene builder. The parent node will be loaded in the mainApp.java:
public class CsvCommander extends Application {
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml"));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Now, for further operations I want to get the stackpane of the parent in FXMLDocument.fxml, but I don't know how to...
e.g.
StackPane container = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml") or the like.
How can I get my root node or stackpane in the Controller pass?