Hello again,
first of all thanks for your answer, this is not strictly java-linux
related so I do a general reply to everybody.
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.
That's why I said something so easy (gridwith as float number) is missing and
I'm forced to use several (3) panels.
In case you have the same idea I got, that is giving gridwith 2 to the buttons
in the first two rows and gridwidth 3 to the ones in the third row, this
doesn't work either :(
I guess that's why the Box layout was added...
Now, about the default color, Alex M. saved me a lot of work (I was changing
the color of each component I displayed...) and confirmed what I said:
sometimes in Java easy, trivial, things are make hard to achieve, not due to
the language itself, but because of how the API are implemented.
I knew that if the background color is set to null, the component inherits the
BG color from the container. Ok... then tell me why by default the background
color is not set to null but to a SystemColor constant! I don't find any logic
in this, the default should be the most generic choice (null), not the most
specific (a fixed constant). Having a JPanel with a default BG color seems to
me most sadic.
Let's try to jump back ontopic: I have no means to check, but could this be a
problem only in the Linux JDK? I don't believe it is likely to be...
---
Andrea "Kontorotsui" Controzzi - MALE Student of Computer Science at
University of Pisa - Italy - E-mail: [EMAIL PROTECTED]
My home page: http://www.cli.di.unipi.it/~controzz/intro.html
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]