I am putting a JFileChooser in my program, but that only takes images. So I decided to add filters:
JFileChooser
import javax.swing.*; public c
the argument of fc.addChoosableFileFilter() should be a subclass of javax.swing.filechooser.FileFilter. For example, you can change your code as
fc.addChoosableFileFilter()
javax.swing.filechooser.FileFilter
fc.addChoosableFileFilter(new FileNameExtensionFilter("Image Files", "jpg", "png", "tif");