> if i put some component in a FlowLayout, they have a "clever" size. But
> i need to have them verticaly, so i use a BoxLayout(Y_AXIS). But the
> layout make the components big to fill all the panel space (in fact the
> 2 radio button are ok, but the combo box has a big height).
> > if i put some component in a FlowLayout, they have a "clever" size. But
> > i need to have them verticaly, so i use a BoxLayout(Y_AXIS). But the
[quoted text clipped - 5 lines]
>
> http://java.sun.com/docs/books/tutorial/uiswing/layout/box.html
well, i did, but when running the demo associated with this:
http://java.sun.com/docs/books/tutorial/uiswing/layout/example-1dot4/BorderLayou
tDemo.java
the buttons have a "good" size, they don't fill all the panel.
By looking at the code, you can see that there isn't any Box.Filler or related.
So why is it working?
Aki \ - 29 Apr 2005 10:14 GMT
>>See "How to Use BoxLayout" in the Java Tutorial. Check out the part on
>>rigid areas, glue, and custom fillers.
[quoted text clipped - 10 lines]
>
> So why is it working?
Since it is using BorderLayout, not BoxLayout?

Signature
-Aki "Sus" Laukkanen
"Älä multa kysy tai mä vastaan!"
"Don't ask me or I'll answer!"
Nomak - 29 Apr 2005 13:47 GMT
> Since it is using BorderLayout, not BoxLayout?
sorry, wrong link
http://java.sun.com/docs/books/tutorial/uiswing/layout/example-1dot4/BoxLayoutDe
mo.java
John McGrath - 29 Apr 2005 20:04 GMT
> the buttons have a "good" size, they don't fill all the panel.
A BoxLayout will *try* to fill the container that it lays out, but it will
also respect the preferred, minimum, and maximum sizes of the components
in the container. If they do not fill the container at their maximum
sizes, it will leave the extra space at the end.

Signature
Regards,
John McGrath
Sean Anderson - 14 May 2005 00:54 GMT
I have set the max size for my components in a vertiaclBox and they are all
centered in the damn window.
Why?
> > the buttons have a "good" size, they don't fill all the panel.
>
[quoted text clipped - 7 lines]
>
> John McGrath
John McGrath - 17 May 2005 00:12 GMT
> I have set the max size for my components in a vertiaclBox and
> they are all centered in the damn window.
>
> Why?
I would guess you have a bug in your code. I have no idea how to figure
out exactly what the problem is without seeing the code. Please post a
runnable example of the problem.

Signature
Regards,
John McGrath