I have already written a tutorial on JavaFX FileChoosers. However, the previous example did not integrate a JavaFX MenuBar or an FXML file into the mix. Typically, you don’t create or design FileChoosers in FXML, though some dialogs can be designed in FXML. However, FileChoosers tend to be created and shown programmatically, rather than in FXML for display later.
This JavaFX FileChooser example shows a basic MenuBar with Open, Save, SaveAs and Quit MenuItems as shown in the image below.