Article View: borland.public.jbuilder.java.swing
Article #8297JFileChooser size problem
From: Joi Ellis
Date: Sun, 01 Oct 2000 00:00
Date: Sun, 01 Oct 2000 00:00
32 lines
1986 bytes
1986 bytes
I've got a JFileChooser with an Accessory panel plugged into it.
When I comment out the addAccessory() method and use showSaveDialog(),
the JFileChooser dialog appears with an appropriate size.
When I uncomment the addAccessory(), the JFileChooser appears badly
sized. No matter what I do, it appears sized too small vertically,
and the south panel containing the save/cancel buttons is not visible.
I have to manually drag the lower edge down to show these buttons.
Note that simply resizing the dialog does NOT repack it properly,
either. Usually when I have packing problems, the first nudge of the
window size makes it repair itself, but no luck this time.
I checked Bug Parade for JFileChooser bugs and found nothing that
matched, but did see another bug relating to size which said the only
workaround was to stick the JFileChooser into its own JFrame.
I tried this, too, and it made no difference.
It looks like JFileChooser is forcing its initial size to 500x300 and
to hell with what I'm telling it...!
How do I force an accessorized JFileChooser to appear with a sane size?
--
Joi Ellis Software Engineer
Aravox Technologies joi@aravox.com, gyles19@visi.com
No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried. Anything
that kicks a monopoly in the pants has got to be good for something.
- Chris Johnson
Technical Details
Message-ID:
<39D7D59D.176E4FA5@aravox.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,2f241fe4201eef13,start X-Google-Attributes: gid111d45,public From: Joi Ellis <joi@aravox.com> Subject: JFileChooser size problem Date: 2000/10/01 Message-ID: <39D7D59D.176E4FA5@aravox.com> X-Deja-AN: 676363747 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Aravox Technologies Mime-Version: 1.0 Reply-To: joi@aravox.com Newsgroups: borland.public.jbuilder.java.swing