I want to set file filters in a JavaFX FileChooser but I could not find a way to do it.
My code:
FileChooser fc = new FileChooser();
fc.setTitle(\"M
This is How you can do it.
FileChooser fc=new FileChooser();
FileChooser.ExtensionFilter fileExtensions =new FileChooser.ExtensionFilter("music files","*.mp3", "*.mp4");
fc.getExtensionFilters().add(fileExtensions);
List selectedFiles=fc.showOpenMultipleDialog(null);
if(selectedFiles!=null){
for(int i=0;i