> From: Kontorotsui <[EMAIL PROTECTED]>



> About the 3 rows of buttons, 2 rows with 3 buttons, the last row with 2
> buttons, I probably failed to explain exactly what was the problem. 
> 
> I am well aware (even too much :) ) of the GridBagLayout, which I used
> everywhere. But, if I'm not mistaken, I've found a limit (you can call it a
> wanted feature) in this layout manager: it is impossible to have a row with a
> smaller number of objects and keep it centered. 
> In my case the third row had 2 buttons, but the gridbag kept the button aligned
> with the first or last two of the rows above, forcing me to use flowlayout. 
> It would have been nice if the gridwitdh and gridheight took float numbers, I
> would have given gridwidth = 1.5 to the buttons in the third row.


Increase the grid resolution.

Instead of three grid columns, with a button in each (for your 3-button
rows), defined a grid with, say, 30 columns, and make each button
10 grid columns wide (one starting in grid column 0, the next at 10,
the third at 20).

Then in your two-button row, make the two buttons 15 grid columns wide.


Daniel



----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to