My abbreviated example of a FileChooser. See MyFileChooser.java. This illustrates optional use of command-line arguments.
FileChooser fileChooser = new FileChooser(); fileChooser.setTitle("Open Resource File"); fileChooser.showOpenDialog(stage);
In this next example we change the directory in which FileChooser opens. See FileChooserSample2.java
Finally we show how to filter the file extensions to be used. See FileChooserSample3.java
Reference : JavaFX FileChooser
Maintained by John Loomis, last updated 7 February 2018