Article View: borland.public.jbuilder.java.api
Article #2042Re: Deleting some files with a given extension
From: Richard van de Stadt
Date: Mon, 02 Jul 2001 14:12
Date: Mon, 02 Jul 2001 14:12
34 lines
2843 bytes
2843 bytes
Laurent Souriau wrote: > > Hi, > > Thank you guys. I have more than I need. > I tried the method with file.list() + the file > name filter and it works out fine. > > thank you > > Laurent If this works fine for you, then maybe you can help me out. I'm adapting someone else's code. One thing we wish to change is that only files with a certain extension are shown when using the FileDialog window. To deal with this, I made a class myFilternameFilter that implements FilenameFilter, created a method accept() for the filtering, and used fileDialog.setFilenameFilter(myFilternameFilter) to set the filter, just before the call to fileDialog.setVisible (true); And then what? This doesn't do anything. All files and directories are shown in the dialog, instead of the ones that accept() accepts. Using the debugger I find that the accept() method isn't executed. How is this accept() method to be used? Should I call it? If so, where/when should I do that? I guess this is something trivial, but I don't seem to get it (yet). The docs don't seem to help me very much. What am I overlooking? Richard.
Technical Details
Message-ID:
<3B408145.2BE692D8@cs.utwente.nl>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!t-online.de!nautilus.eusc.inter.net!wuff.zikzak.de!news.cs.utwente.nl!not-for-mailReferences:
<9ga32n$t3t$1@s1.read.news.oleane.net> <9gcfuu$td1$1@s1.read.news.oleane.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10568c,ede28868063ec521 X-Google-Attributes: gid10568c,public X-Google-Thread: 1089d0,ede28868063ec521 X-Google-Attributes: gid1089d0,public X-Google-Thread: f74b3,ede28868063ec521 X-Google-Attributes: gidf74b3,public X-Google-Thread: 113ae9,ede28868063ec521 X-Google-Attributes: gid113ae9,public X-Google-Thread: f631b,ede28868063ec521 X-Google-Attributes: gidf631b,public X-Google-Thread: 10a146,ede28868063ec521 X-Google-Attributes: gid10a146,public X-Google-ArrivalTime: 2001-07-02 07:12:26 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!t-online.de!nautilus.eusc.inter.net!wuff.zikzak.de!news.cs.utwente.nl!not-for-mail From: Richard van de Stadt <stadt@cs.utwente.nl> Newsgroups: borland.public.jbuilder.java.api,borland.public.jbuilder.java.language,comp.lang.java.help,comp.lang.java.programmer,de.comp.lang.java,fr.comp.lang.java Subject: Re: Deleting some files with a given extension Date: Mon, 02 Jul 2001 16:12:21 +0200 Organization: University of Twente, Enschede, The Netherlands Lines: 34 Distribution: world Message-ID: <3B408145.2BE692D8@cs.utwente.nl> References: <9ga32n$t3t$1@s1.read.news.oleane.net> <9gcfuu$td1$1@s1.read.news.oleane.net> NNTP-Posting-Host: utip386.cs.utwente.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ares.cs.utwente.nl 994083142 18071 130.89.13.79 (2 Jul 2001 14:12:22 GMT) X-Complaints-To: abuse@cs.utwente.nl NNTP-Posting-Date: 2 Jul 2001 14:12:22 GMT X-Mailer: Mozilla 4.77 [en] (WinNT; U) X-Accept-Language: en