I understand the use of Swing and JFileChooser, this is a simple use case of getFileFilter , but I cannot find any similar parameters in JavaFX2 for this FileChooser.
The problem is that when saving the file, if the file extension is not explicitly entered by the user, I want the file to be added with the current selected file extension in the FileChooser drop-down list.
In the following image, I would like to save this file as text.xml, for example.

source share