title: How to save a file using FileChooser in JavaFX
body: <p>How to save a file using FileChooser from JavaFX,
  here's my sample:</p>
  <pre><code>public static void clickDownloadButton(String filename,Stage window){
     File file = new File(filename);
     FileChooser fileChooser = new FileChooser();
     fileChooser.setTitle(&quot;Save file&quot;);
     fileChooser.showSaveDialog(window);
  }
  </code></pre>