Looks like you've imported
javax.swing.filechooser.FileFilter
instead of
java.io.FileFilter
Probably occurred when selecting the import from the IDE
If the correct import is used, the code should not compile due to the existence of the getDescription
method which is only found in the former. The description is used for display purposes on JFileChooser
dialogs and doesnt apply here.