I need to get the file path of the .config folder only can any one help me
Asked
Active
Viewed 101 times
-1
-
You need to add details on exactly `what you want`, `what you have tried` so far and `what doesn't work`. Unless you add these details, this question most probably will get closed. – ItachiUchiha Jun 19 '15 at 05:16
1 Answers
1
You can add ExtensionFilter
to your FileChooser
to select only .config files (or any type) via FileChooser
.
e.g.
FileChooser flc = new FileChooser();
flc.setTitle("Select File");
ExtensionFilter ext = new ExtensionFilter("Config Files", "*.config");
flc.getExtensionFilters().add(ext);
File tmpFile = flc.showOpenDialog(stage);
You can set any extention type to the FileChooser. e.g.
ExtensionFilter ext = new ExtensionFilter("Image Files", "*.png", "*.jpg", "*.jpeg");
Hope it helps.!

Ashish
- 325
- 3
- 9