title: How do I open the JavaFX FileChooser from a controller class?
body: <p>My problem is that all the examples of using <code>FileChooser</code> requires you to pass in a stage. Only problem is that my UI is defined in an <code>fxml</code> file, which uses a controller class separate from the main stage.</p>
  
  <pre><code>@FXML protected void locateFile(ActionEvent event) {
      FileChooser chooser = new FileChooser();
      chooser.setTitle("Open File");
      chooser.showOpenDialog(???);
  }
  </code></pre>
  
  <p>What do I put at the <code>???</code> to make it work? Like I said, I don't have any references to any stages in the controller class, so what do I do?</p>