Article View: borland.public.jbuilder.java.language
Article #14722Re: FileNameFilter (jpg, gif)
From: Ben Starr
Date: Thu, 05 Aug 1999 00:00
Date: Thu, 05 Aug 1999 00:00
9 lines
1101 bytes
1101 bytes
Basically, just implement the accept method and if the name parameter ends with (ie: java.lang.String.endsWith) "jpg" or "gif" return true, otherwise return false. The file dialog will pass each file it wants to display to the accept method and will only display it if you return true from your method. Ben Starr BenS@compurp.org.uk (Please note my e-mail address has been altered to avoid spammers, change compurp to commonpurpose if you wish to e-mail me)
Technical Details
Message-ID:
<933843275.7937.0.nnrp-03.c3add604@news.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<37A8D30C.67AB21F6@virgin.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,628697148422e9c6 X-Google-Attributes: gidf74b3,public From: "Ben Starr" <BenS@compurp.org.uk> Subject: Re: FileNameFilter (jpg, gif) Date: 1999/08/05 Message-ID: <933843275.7937.0.nnrp-03.c3add604@news.demon.co.uk> X-Deja-AN: 509110092 X-NNTP-Posting-Host: [195.173.214.4]:195.173.214.4 References: <37A8D30C.67AB21F6@virgin.net> X-Trace: news.demon.co.uk 933843275 nnrp-03:7937 NO-IDENT [195.173.214.4]:195.173.214.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Newsgroups: borland.public.jbuilder.java.language X-Complaints-To: abuse@demon.net