title: Javafx: Open a new FXML from another Java Class
body: <p>I have a JavaFx application with following files:</p>
  
  <ol>
  <li>MainApp.java - Java class responsible for handling the application</li>
  <li>Controller.java - Corresponding controller file</li>
  <li>Design.fxml - FXML file for the application which is loaded via MainApp.java and controlled by Controller.java</li>
  </ol>
  
  <p>Now, let's say I have another class file as Compute.java which has a method (say doSomething()). When this method terminates, I wish to open a built-in Alert box or a custom FXML file on top of the original FXML file (say, a box which states "Work Completed").</p>
  
  <p>Please suggest a neat solution for this (which does not involve moving the logic of Compute.java to any other file or to the Controller.java. Also, I wish to keep the Compute.java clean of JavaFx code).</p>