Article View: borland.public.jbuilder.java.language
Article #16036Re: FilenameFilter
From: Patrick Carroll
Date: Thu, 08 Apr 1999 00:00
Date: Thu, 08 Apr 1999 00:00
31 lines
1700 bytes
1700 bytes
I looked in the Java documentation and found:
Interface java.io.FilenameFilter
The "Interface" bit is somwwhat of a giveaway.
To set a filter for the Filer, you must create a class that implements
FilenameFilter. This interface includes an accept() method that returns a
boolean value indicating whether a particular file meets the filtering
specifications laid out in accept(). For example, accept() might return
true if a file has a .java extension.
Gavin wrote:
> I'm having a real problem incorporating a FilenameFilter into a filer.
> I have a FilenameFilter called only, which only allows for files ending
> in .viewer
>
> I know for a fact that this works - having used it with the File.list()
> command successfully.
>
> However, when I use filer1.setFilenameFilter (only), I get an error
> message saying
> "FilenameFilter not implemented".
> Why is this appearing.???!!! The filer still appears when the show()
> method is called, but the only option available is all files (*.*).
> Please help me, this is dead annoying!!
>
> By the way, I'm running this on Windows 95, if that changes anyfink.
Technical Details
Message-ID:
<370CF5B0.7C32072A@witsys.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<370CC4FC.283DF2DF@apion-tss.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,71e2ddba0b7f022a X-Google-Attributes: gidf74b3,public From: Patrick Carroll <PCarroll@witsys.com> Subject: Re: FilenameFilter Date: 1999/04/08 Message-ID: <370CF5B0.7C32072A@witsys.com> X-Deja-AN: 464126865 Content-Transfer-Encoding: 7bit References: <370CC4FC.283DF2DF@apion-tss.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language