Kontorotsui wrote:
>
> After extensive experience with Java GUI, mostly by using Swing, I wonder why
> there are hard tasks which can be accomplished very easily and easy ones which
> look almost impossible.
>
> Here are two examples.
>
> I have a grid with 3 buttons in the first row and 2 buttons in the third, I
> wanted to place the third row buttons centered, like this:
>
> XX XX XX
>
> XX XX XX
>
> XXX XXX
>
> but no layout manager allows to do it in a single panel, I had to do several
> panels.
I've found Swing's Box component great for this sort of job. Yes, you
have to create multiple boxes (this example would require 3 horizontal
boxes inside a vertical box), but they're easy to use, low-overhead, and
the "glue" and "strut" components make it dead-easy to construct this
sort of layout.
Nathan
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]