Thread View: borland.public.jbuilder.java.swing
7 messages
7 total messages
Started by Abdullah Kauchali
Wed, 20 Oct 2004 10:56
Explain XYLayout vs GridbagLayout to a Delphi user!
Author: Abdullah Kauchali
Date: Wed, 20 Oct 2004 10:56
Date: Wed, 20 Oct 2004 10:56
20 lines
1668 bytes
1668 bytes
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? 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?) Kind regards Abdullah
Re: Explain XYLayout vs GridbagLayout to a Delphi user!
Author: 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.
Re: Explain XYLayout vs GridbagLayout to a Delphi user!
Author: John McGrath [TeamB]
Date: Thu, 21 Oct 2004 23:38
Date: Thu, 21 Oct 2004 23:38
24 lines
1770 bytes
1770 bytes
On 10/20/2004 at 9:11:12 AM, Paul Furbacher [TeamB] wrote:
> > 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?
This seems to imply that variable sizes is not an issue for Delphi or
native Windows applications, but that is not the case. You can change
the DPI setting for your display (under Display Properties | Settings |
Advanced | General | DPI Setting), and text will render larger than it
"normally" does. I have run across a number of Windows programs that do
not deal with this properly, causing labels to overlap, etc.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Re: Explain XYLayout vs GridbagLayout to a Delphi user!
Author: Paul Furbacher [TeamB]
Date: Fri, 22 Oct 2004 17:21
Date: Fri, 22 Oct 2004 17:21
40 lines
2545 bytes
2545 bytes
John McGrath [TeamB] wrote:
> On 10/20/2004 at 9:11:12 AM, Paul Furbacher [TeamB] wrote:
>
>
>>>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?
>
>
> This seems to imply that variable sizes is not an issue for Delphi or
> native Windows applications, but that is not the case. You can change
> the DPI setting for your display (under Display Properties | Settings |
> Advanced | General | DPI Setting), and text will render larger than it
> "normally" does. I have run across a number of Windows programs that do
> not deal with this properly, causing labels to overlap, etc.
Oh, nitpick, will you! (Smileys needed?)
You are right, but no one wants to admit
that 99% of Windows programs fail in this
regard. (Am I exaggerating with that number?)
Maybe the Delphi API needs a TGridBagLayout class?
--
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.
Re: Explain XYLayout vs GridbagLayout to a Delphi user!
Author: John McGrath [TeamB]
Date: Sat, 23 Oct 2004 03:50
Date: Sat, 23 Oct 2004 03:50
35 lines
2661 bytes
2661 bytes
On 10/22/2004 at 1:21:20 PM, Paul Furbacher [TeamB] wrote:
> You are right, but no one wants to admit
> that 99% of Windows programs fail in this
> regard. (Am I exaggerating with that number?)
I have not run into it that much in Windows program, but I do run into it
quite a bit. Where it seems to the most common is on web pages. If you
use a decent browser such as Mozilla, it will allow you to increase the
font size, which is a very nice feature if your eyes get tired toward the
end of the day. A very large percentage of the web pages I encounter mess
up badly if the fonts are not exactly the same as what the web developer
had on his system.
One of the reasons that it is less prevalent on Windows systems is that
the Windows program has more control over the environment. The programmer
can prevent the user from resizing a dialog box, rather than taking a
little bit of care and making sure that the dialog behaves properly when
resized. Unfortunately, when the programmer does this, the dialog size is
chosen to accommodate the least capable system, so the user ends up
reading content through a postage-stamp sized window centered in the
middle of a 21 inch monitor.
> Maybe the Delphi API needs a TGridBagLayout class?
Now that would scare the bejesus out of the lot of them. :o)
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Re: Explain XYLayout vs GridbagLayout to a Delphi user!
Author: Paul Furbacher [TeamB]
Date: Sat, 23 Oct 2004 04:51
Date: Sat, 23 Oct 2004 04:51
36 lines
2274 bytes
2274 bytes
John McGrath [TeamB] wrote:
> On 10/22/2004 at 1:21:20 PM, Paul Furbacher [TeamB] wrote:
>
>> You are right, but no one wants to admit that 99% of Windows
>> programs fail in this regard. (Am I exaggerating with that
>> number?)
>
> I have not run into it that much in Windows program, but I do run
> into it quite a bit. ...
Doesn't it frequently happen when one resets
the Display Properties > Settings > Advanced
> General : Display -- Font size: from small
to large or other. I seem to remember that
few programmers ever test this and as a
result, their labels and whatnot are invariably
cutoff in the resizing which occurs.
Anyway, why am I writing about this? [rhetorical]
--
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.
Re: Explain XYLayout vs GridbagLayout to a Delphi user!
Author: John McGrath [TeamB]
Date: Sat, 23 Oct 2004 16:38
Date: Sat, 23 Oct 2004 16:38
22 lines
1852 bytes
1852 bytes
On 10/23/2004 at 12:51:16 AM, Paul Furbacher [TeamB] wrote:
> Doesn't it frequently happen when one resets
> the Display Properties > Settings > Advanced
> > General : Display -- Font size: from small
> to large or other. I seem to remember that
> few programmers ever test this and as a
> result, their labels and whatnot are invariably
> cutoff in the resizing which occurs.
It happens, but it is certainly not universal. I have the DPI setting on
my primary development system set to "Large Fonts (120 DPI)", and I only
occasionally run into programs with problems.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads