Article View: borland.public.jbuilder.java.swing
Article #7734Re: repost: modifying JFileChooser
From: Niall Pemberton
Date: Fri, 05 Jan 2001 19:13
Date: Fri, 05 Jan 2001 19:13
13 lines
1444 bytes
1444 bytes
I realise it doesn't answer your question about changing the label text but
what if you use the following:
JFileChooser chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
int ret = chooser.showDialog(this, "Select Directory");
Using the "showDialog()" method instead of "showOpenDialog()" allows you to
pass text which replaces the text on the "Open" button and Dialog title.
Setting this to "Select Directory" I think makes it more obvious for your
user.
Niall
Technical Details
Message-ID:
<3a561d12_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!uunet!osa.uu.net!dfw.uu.net!arb.uu.net!nyc.uu.net!News.Amsterdam.UnisourceCS!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!213.1.78.127References:
<3A551881.D61DEB98@blueberry.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,89fb584cc774168e X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2001-01-05 11:17:50 PST From: "Niall Pemberton" <Niall.Pemberton@btinternet.com> Newsgroups: borland.public.jbuilder.java.swing References: <3A551881.D61DEB98@blueberry.com> Subject: Re: repost: modifying JFileChooser Date: Fri, 5 Jan 2001 19:13:48 -0000 Lines: 17 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 NNTP-Posting-Host: 213.1.78.127 Message-ID: <3a561d12_1@dnews> X-Trace: 5 Jan 2001 11:14:26 -0800, 213.1.78.127 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!uunet!osa.uu.net!dfw.uu.net!arb.uu.net!nyc.uu.net!News.Amsterdam.UnisourceCS!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!213.1.78.127