Re: BoxLayout making component too big



On Thu, 28 Apr 2005 21:25:49 GMT
"John McGrath" <ng@xxxxxxxxxxxxx> wrote:

> On 4/26/2005 at 5:33:11 AM, Nomak wrote:
>
> > 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).
>
> See "How to Use BoxLayout" in the Java Tutorial. Check out the part on
> rigid areas, glue, and custom fillers.
>
> 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/BorderLayoutDemo.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?
.