This is my current project structure:
guiPackage
    Window
    WindowController
mainPackage
    Main
The Main class handles my main program and logic (in main method).
The Window class is just a basic window with a label.
How would I update the label text from my Main class? I assume I need to access the controller and pass data to it.
Is this the correct structure for a JavaFX project or is there a better way of doing things?
Edit: This is the code from my main method:
    Window.launch(Window.class);
    FXMLLoader fxmlLoader = new FXMLLoader(Viewer.class.getResource("/gui/fxml/Viewer.fxml"));
    ViewerController controller = fxmlLoader.getController();
    controller.setLabelText("Test");
This doesn't appear to change the label text at all.
