I have a method in the app class that returns the main window (stage), and when I call the method from the controller class inside the initialize function, it returns null. How to fix that?
I think it's because the scene is not initialized, you need to have it initialized in order to access the stage.
Initialize is what happens when you originally open the scene. Behind the scenes it makes a lot of fxml data that you can get such as stage.