I'm developing a Java app using JavaFX for it's user interface.
When I use the FileChooser class to load a CSV file from the computer hard drive in Os X Mavericks the dialog shows me all the files and folders, even the hidden one creating a lot of noise and making really hard to find the desired file.
This screenshot illustrates what I'm talking about:
I think this could be more a OS X issue, but I don't understand how to fix, at least I don't understand how I can fix it with JavaFX FileChooser class.
Here's my code:
Stage stage = new Stage();
FileChooser fileChooser = new FileChooser();
fileChooser.setTitle("Open File");
fileChooser.getExtensionFilters().addAll(
new FileChooser.ExtensionFilter("Comma-Separated Values (CSV)", "*.csv")
);
fileChooser.setInitialDirectory(
new File(System.getProperty("user.home"))
);
File selectedFile = fileChooser.showOpenDialog(stage);
Update
This is the Google Chrome modal to open files.