Article View: borland.public.jbuilder.java.swing
Article #9851Re: Dynamic component resizing
From: Paul Furbacher [TeamB]
Date: Mon, 10 Jan 2000 00:00
Date: Mon, 10 Jan 2000 00:00
18 lines
1114 bytes
1114 bytes
Darko Krsul wrote: > > What is the way to have size of a component dynamically change (i.e. > size of a JTextField, depending on string length), but never go beyond > some predefined size? > > I expected ‘setPreferredSice’ to do the job, but that way size stays > fixed. Have you tried setting "maximumSize"? As for allowing it to grow, that is dependent on which layout manager is handling the layout. If it's a GridBag, I think you have to set the X weighting to 1.0. Paul Furbacher (TeamB)
Technical Details
Message-ID:
<387A70B4.EA3524A2@bilbo.bio.purdue.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38762CDB.3ED73884@hyperion.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 111d45,67b31e308527b7b8 X-Google-Attributes: gid111d45,public From: "Paul Furbacher [TeamB]" <pf@bilbo.bio.purdue.edu> Subject: Re: Dynamic component resizing Date: 2000/01/10 Message-ID: <387A70B4.EA3524A2@bilbo.bio.purdue.edu> X-Deja-AN: 570931232 Content-Transfer-Encoding: quoted-printable References: <38762CDB.3ED73884@hyperion.com> Content-Type: text/plain; charset=iso-8859-1 Organization: Reverse Alchemy, Inc. Mime-Version: 1.0 Reply-To: pf@bilbo.bio.purdue.edu Newsgroups: borland.public.jbuilder.java.swing