The FilenameFilter is used to filter out files in visual components (e.g. when you navigate to a folder, only *.java files would be seen) and in cases where you need to return file names which satisfy a given criteria. Basically for filtering needs based on "file names", FilenameFilter is used.
FileFilter on the other hand deals with "File" objects i.e. filtering based on a given File attributes like; is the file hidden, is it read only; something which a file name can't give you.
Of course, it's pretty trivial to create a File object based on its name and parent directory so I guess these "two" filters are more of convenient wrappers over the same concept but slightly different use cases.
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734