🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #8243

Re: JFileChooser size problem

#8243
From: John McGrath TeamB
Date: Fri, 06 Oct 2000 00:00
25 lines
1557 bytes
On Thu, 05 Oct 2000 11:41:42 -0500, Joi Ellis wrote:

> I could try getting the preferred size and increasing it
> by some amount.

Unfortunately, the preferred size is what is fixed (500x300).  I looked 
into packing the JFileChooser and then seeing how small the accessory 
component was, and then increasing the size of the JFileChooser by the 
difference.  But it actually sets the size of the accessory to its 
preferred size.  The components are not smaller than requested;  they 
just do not fit in the JFileChooser.

One thing that might work would be to lay out the JFileChooser, find the 
largest bottom and right coordinates of the components inside it, and 
then set the preferredSize based on that.  You would have to adjust for 
the bottom and right margins, since that approach would leave no margin.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.1447408799154e989bd8@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39D7D59D.176E4FA5@aravox.com> <MPG.1445eb857969656e989bd0@forums.borland.com> <39DCAF46.691AA246@aravox.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,2f241fe4201eef13
X-Google-Attributes: gid111d45,public
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Subject: Re: JFileChooser size problem
Date: 2000/10/06
Message-ID: <MPG.1447408799154e989bd8@forums.borland.com>
X-Deja-AN: 678198002
References: <39D7D59D.176E4FA5@aravox.com> <MPG.1445eb857969656e989bd0@forums.borland.com> <39DCAF46.691AA246@aravox.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing