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.
Use a GridBag. Think of it as 6 blocks wide. The items in the first two rows get
a width of 2 and the items in the last row get a width of 3.
--
_,--"
dik `-._ ________-_______ "----
_----'--'--------------------------------'--'----_
//_| | \ [EMAIL PROTECTED] / | |_\\
(_____|_|__= Guilford CT +1.203.458.0389 =__|_|_____)
_\_____=___ http://www.buckosoft.com ___=_____/_
\/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
Early Klingon Poetry:
Wustl, Wustl, ERR RIP MIT BOOT, BIND Wustl
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]