🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Resizing problems

#7640
From: Rich Wilkman
Date: Wed, 10 Jan 2001 20:46
32 lines
2056 bytes
Sam:

XYLayout will never get you there -- that's the problem with co-ordinate
based layouts.  Things go where you stick them at the size you stick them
there.  I haven't seen a PercentOfContainer layout so you'll probably have
to invent one (or use GridBagLayout which is very, very powerful).

-Rich

Sam wrote:

> Hi all-
>
> I'm trying to allow a user to resize a GUI.  I'm trying to get it
> working on a test application first, which has a table within a scroll
> pane, on a panel in a frame.  When the frame is resized, I'd like the
> scroll pane to adjust its size based on a percentage of the size of the
> frame.
>
> I'm trying to use the XYLayout, but it seems that no matter what I do
> (e.g. set bounds, delete and re-add the component, set preferred sizes,
> etc) the sizes of the components always go back to their initial size.
> Sometimes you can see the scroll pane flash to the correct size for a
> moment, but then it resizes to the original XYConstraints.
>
> I was hoping not to use a different layout manager, if possible.
>
> Can anyone tell me what I'm doing wrong?
> Thanks
> Sam
>
> BTW, I'm using JBuilder3.
Technical Details
Message-ID: <3A5CCA16.7EC9FF9A@formlessvoid.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!neel.uni2.net!newssuck.uni2.dk!bornews.borland.com!dnews!209.144.169.10
References: <3A5CBA35.FBDC69B0@home.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,ecab773c49c5caa6
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2001-01-10 12:56:09 PST
Message-ID: <3A5CCA16.7EC9FF9A@formlessvoid.com>
Date: Wed, 10 Jan 2001 12:46:14 -0800
From: Rich Wilkman <richw@formlessvoid.com>
Reply-To: richw@formlessvoid.com
X-Mailer: Mozilla 4.74 [en] (WinNT; U)
X-Accept-Language: en,ja
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: Resizing problems
References: <3A5CBA35.FBDC69B0@home.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 209.144.169.10
X-Trace: 10 Jan 2001 12:46:26 -0800, 209.144.169.10
Lines: 33
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!neel.uni2.net!newssuck.uni2.dk!bornews.borland.com!dnews!209.144.169.10