cant set FileFilter?

I get this error

Exception in thread "main" java.lang.Error: Unresolved compilation problem:

The method setFileFilter(FileFilter) in the type JFileChooser is not applicable for the arguments (FileFilter)

for this code

JFileChooser jfc =new JFileChooser();

jfc.setMultiSelectionEnabled(false);

FileFilter filefilter;

filefilter =new FileFilter()

{

publicboolean accept(File file)

{

returntrue;

}

public String getDescription()

{

return"EXE ONLY";

}

};

jfc.setFileFilter(filefilter);

[1089 byte] By [forumusera] at [2007-11-27 4:36:41]
# 1
There are two FileFilter classes, one in java.io and another in javax.swing.filechooser. Check which one you're importing in your class, and which one is expected by the method call that doesn't compile.
kirillga at 2007-7-12 9:46:51 > top of Java-index,Desktop,Core GUI APIs...