The newest version of the JavaFX FileChooser uses native FileChoosers to allow the selection of files. This means that the FileChooser is guaranteed to pass Apple Store requirements on having the OS and not the app control file system operations. However, it also means that the look and feel of your app may clash with the look and feel of the JavaFX file chooser, thus providing a degraded user experience. Most would say that is a fair trade off, as customers will already be used to their OS’s file chooser, and custom a JavaFX file chooser might hurt the user experience.
This short JavaFX tutorial goes into the three most common FileChooser uses. They are:
- Choosing one file to open
- Choosing multiple files to open
- Saving to a file
We’ll go into all three uses with examples.