plzzzz hellpppp me out
give some examples on FilenameFilter and FileFilter in java ....
Collapse
X
-
Both are used by several utitility components such as FileDialog and JFileChooser.Originally posted by dmjproplzzzz hellpppp me out
Both interfaces define a single boolean method that determines wheter a certain
file should be accepted for display (or inclusion in a List). It's up to you to
build a small class that implements at least one of those interfaces.
Here's an example:This filter only accepts files starting with "foo".Code:public class FooFilter implements FileFilter { public boolean accept(File file) { return file.getName().startsWith("foo"); } }
kind regards,
Jos
Comment