Article View: borland.public.jbuilder.java.swing
Article #11425Re: XYLayout to GridbagLayout ?
From: Rich Wilkman
Date: Fri, 28 May 1999 00:00
Date: Fri, 28 May 1999 00:00
43 lines
2237 bytes
2237 bytes
Tor: I'm really good with GBL, but unless the container has fewer then 5 widgets in it I don't start in GBL! I just don't leave things in XY or null, either <g>. GBL gets very complex when we have to estimate on drag events to get sizing and weights, etc. If you want to work with GBL directly, I'd suggest just dropping components (getting the preferred size) and then adding rows and columns for expansion. After that, adjust spans, pads, etc. to get things just right. We're pretty good at estimating/interpreting those drag and drop items, but there's no way to always be right. -Rich Tor Iver Wilhelmsen wrote: > > "Sohan Mendis" <sohan@maxtrak.com> writes: > > > I need to convert XYLayout to Gridbag programmatically. ie I have ( x,y, > > width,height) . How should I do the conversion ? > > It's a bit complicated: You need to use every component's relative > position (x,y) to determine what cell they go in, and then use no > fill, no weights, northeast attachment and internal padding equal to > the size minus the insets. > > It can be done (obviously, since JBuilder's designer does it), but why > not use GBL in the first place? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Rich Wilkman Senior Quality Assurance Engineer Borland JBuilder Team If you see something that looks like an opinion up there, it's mine and mine alone. Mail sent to me from the newsgroups won't bounce but will be ignored. If I have time, I'll respond, but you have a better chance if you confine your posts to the newsgroups =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<374EBA87.5F93BAE1@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7ikpl8$55217@forums.borland.com> <u4skx4q2d.fsf@sds.no>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,3e96a4cb16051986 X-Google-Attributes: gid111d45,public From: Rich Wilkman <rwilkman@inprise.com> Subject: Re: XYLayout to GridbagLayout ? Date: 1999/05/28 Message-ID: <374EBA87.5F93BAE1@inprise.com> X-Deja-AN: 483150312 Content-Transfer-Encoding: 7bit References: <7ikpl8$55217@forums.borland.com> <u4skx4q2d.fsf@sds.no> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing