How to save a file using FileChooser in JavaFX
<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>