filter in FileChooser

my application requires to browse the file system for jpg files on the 'browse' button click.

I am trying to enter a filter using the following line of code

JFileChooser chooser =new JFileChooser();

chooser.setFileFilter(javax.swing.filechooser.FileFilter);

I have imported "javax.swing.*"

but, I get the following compilation error

"Javadoc not found. Either Javadoc documentation for this item does not exist or you have not added specified Javadoc in the Java Platform Manager or the Library Manager."

What should I do to get away with this error and include the filter?

[659 byte] By [arc_ga] at [2007-11-26 23:59:57]
# 1
This looks to be an error message from your development tool and not from javac or java.
sabre150a at 2007-7-11 15:49:27 > top of Java-index,Java Essentials,Java Programming...
# 2

It has to look like that:

chooser.setFileFilter(new javax.swing.filechooser.FileFilter() {

public boolean accept(File f) {

return f.isDirectory() || f.getName().toLowerCase().endsWith(".jpg");

}

public String getDescription() {

return "jpeg";

}

});

Wildcard82a at 2007-7-11 15:49:27 > top of Java-index,Java Essentials,Java Programming...
# 3
Javadoc shouldn' t matter at all for compilation; you have something else incorrectly configured in whatever IDE you are using.
tjacobs01a at 2007-7-11 15:49:27 > top of Java-index,Java Essentials,Java Programming...
# 4
Thanx Wildcard82, this code worked
arc_ga at 2007-7-11 15:49:27 > top of Java-index,Java Essentials,Java Programming...