I'm developing an application using JavaFX and I have to use a DirectoryChooser. I'm calling it through the following code:

 DirectoryChooser chooser = new DirectoryChooser();
 chooser.setInitialDirectory(new File("~/Downloads/"));
 chooser.setTitle("JavaFX Projects");
 Button browse = new Button("Browse");
            new EventHandler<MouseEvent>() {
                public void handle(MouseEvent e) {
                     File  file=chooser.showDialog(MyStage);
                    if (file != null) {

On Mac OS X DirectoryChooser opens, but it doesn't set customized title and the app isn't blocked by it, I can still use it and open other DirectoryChooser dialogs.

On Windows systems the same code works perfectly, both title setting and app blocking.

Thanks for your help