Article View: borland.public.jbuilder.java.swing
Article #866Re: Explain XYLayout vs GridbagLayout to a Delphi user!
From: Paul Furbacher [TeamB]
Date: Wed, 20 Oct 2004 13:11
Date: Wed, 20 Oct 2004 13:11
62 lines
3397 bytes
3397 bytes
Abdullah Kauchali wrote:
> A couple of things (coming from Delphi):
>
> 1. I drag and drop, position and resize my visual components as I see fit.
> 2. I compile and everything's where I put it.
>
> With JBuilder, I can use the XYLayout to achieve the same functionality, but
> I hear that the XYLayout should be *avoided*:
>
> http://groups.google.co.za/groups?hl=en&lr=&threadm=MPG.11d37293f9d9d53a9896d1%40news.mindspring.com&rnum=6&prev=/groups%3Fhl%3Den%26lr%3D%26q%3Dxylayout%26btnG%3DSearch
>
> My questions:
>
> 1. Why is XYLayout to be avoided?
Because, unlike Delphi, you potentially run
your application on *any* platform. Are the
fonts sizes, etc., the same on a Mac, Linux,
and Windows? Don't fight it by trying to
maintain that Delphi is right and Java is
wrong: just learn the gridbag. It's not that
hard, and the benefits far outweigh any
difficulty adjusting your thinking to it.
>> 2. Is there some sort of an automated way to convert to Gridbaglayout AFTER
>> positioning the controls in XYLayout? (Click one button and it's converted
>> ... type of thing?)
Yes, select the container (a panel) which has
been set to XYLayout, set GridBagLayout in the
"layout" property in the Property Inspector.
Yes, you will have to do some fixing up. Use
the GridBagLayoutAssistant by selecting an
object you want to align, right-click, select
"Constraints...". By invoking the assistant
this way, you can visit each out-of-place
object, make changes to its settings, hit "Apply"
and move on to the next object. You don't need
to open and close the assistant for every object.
If you activate it from the Property Inspector,
it is not as flexible.
Please search the archives of these newsgroups
for extensive coverage. To write about it again,
and again, and again, is to, well ... just visit
the archives, please.
--
Paul Furbacher (TeamB)
Save time, search the archives:
http://www.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Technical Details
Message-ID:
<417663ef$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!diablo.voicenet.com!38.119.100.83.MISMATCH!news-out1.nntp.be!propagator2-sterling!news-in-sterling.newsfeeds.com!in.nntp.be!caladan.arrakis.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41764478@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,e5dc3c739f1ab78 X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 20 Oct 2004 09:11:12 -0400 From: "Paul Furbacher [TeamB]" <pfurbacher@mac.com> Organization: Reverse Alchemy, Inc. User-Agent: Mozilla Thunderbird 0.8 (Macintosh/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Re: Explain XYLayout vs GridbagLayout to a Delphi user! References: <41764478@newsgroups.borland.com> In-Reply-To: <41764478@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.142.222.65 Message-ID: <417663ef$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1098277871 69.142.222.65 (20 Oct 2004 06:11:11 -0700) Lines: 62 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!diablo.voicenet.com!38.119.100.83.MISMATCH!news-out1.nntp.be!propagator2-sterling!news-in-sterling.newsfeeds.com!in.nntp.be!caladan.arrakis.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail