Article View: borland.public.jbuilder.java.swing
Article #9576Re: Gridbag component size limits
From: Paul Furbacher
Date: Tue, 29 Feb 2000 00:00
Date: Tue, 29 Feb 2000 00:00
28 lines
1920 bytes
1920 bytes
Dylan Etkin wrote: > > I have a JComboBox in a GridBag Layout that does not respond to maxSize > and minSize settings > when a text string longer than the max value has been added. Instead of > the box remaining the same size and allowing the user to scroll through > the string it increases the box to display the full screen. I have > tried setting maxSize, minSize, and preferedSize all to the same length > but it makes no difference. Any help would be apprciated. Setting the sizes is part of the equation. Look at the constraints property by popping up the editor. Make sure that the Fill property is set to "None", and that the Weights are set to 0.0. There's more finessing you can do to make sure that the combobox doesn't move in relation to the location of its label -- typically you'd set the Anchor to "W" if the label is to the left of the combobox. Off-topic a bit: as I see it, the GridBagLayout (GBL) editor is perhaps the most valuable component of the Designer. Sure, one could do it by hand, but as of JBuilder v 2.01, GBL editor is rock stable. It will allow you to set multiple components at the same time, or one after the other, if you open the editor with a right-click, and press the "Apply" button for each component you change. It's good stuff. Paul Furbacher (TeamB)
Technical Details
Message-ID:
<38BC443A.54EC62A1@home.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38BC2500.D728FDB4@evergreen.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,a751df2c4bf57a95 X-Google-Attributes: gid111d45,public From: Paul Furbacher <pnf@home.com> Subject: Re: Gridbag component size limits Date: 2000/02/29 Message-ID: <38BC443A.54EC62A1@home.com> X-Deja-AN: 591491643 Content-Transfer-Encoding: 7bit References: <38BC2500.D728FDB4@evergreen.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Reply-To: pnf@home.com Newsgroups: borland.public.jbuilder.java.swing