title: How to reference primaryStage
body: <p>I use .fxml-Files for the view-layer of my application. Each fxml has a controller attached to it </p>
  
  <pre><code>&lt;AnchorPane fx:controller="movielistjavafx.view.MainWindowController"&gt;
  </code></pre>
  
  <p>Let's assume I have a mainFrame and it's controller. The mainFrame.fxml is loaded in the <code>start(Stage)</code>-method.</p>
  
  <p>Now you would like to show a fileChooser which is attached to a Stage/Window/Whatever.</p>
  
  <p>For that it would be good to let the fxml-controller know about the <em>for example</em> <code>primaryStage</code>.</p>
  
  <p>Is there any way to inject it to the controller, or does the FXML know at runtime to which scene and stage it belongs?</p>
  
  <p>Only idea I have is to store primaryStage in some static context, but that seems not like a way to do it to me.</p>