The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Still a problem with FileFilter

Posted by Thi on November 28, 2001 at 11:54 PM

> The compilation error is because javax.swing.filechooser.FileFilter is a class, not an interface. This is an easy mistake to make, since java.io.FileFilter is an interface.

Brian, thanks for the quick response. Your answer may be correct, but it still doesn't help me with filtering files in a file dialog. :) In Core Java, it says that javax.swing.filechooser.FileFilter is an interface and it shows example code for implemeting it? When I replaced it with java.io.FileFilter, the setFileFilter method won't accept it as an argument because it only accepts javax.swing.filechooser.FileFilter.






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us