Easy Layout Question

From: AJ (jerseycat10_at_yahoo.com)
Date: 12/29/03


Date: 29 Dec 2003 07:42:44 -0800

I am trying to create an application that has a column of Components
on the leftsize, and a JPanel filling the entire right side of the
screen.

I have this working.

However, I am having trouble configuring a Layout Manager for the
JPanel containing the components on the left hand side.

This JPanel contains mainly buttons, but there will be one or two
JSliders, and maybe a JSpinner. I want all of these components to be
the same width and height.

I have tried a GridLayout, but the PreferredSize of the component is
ignored, and the components are drawn to fill the entire JPanel, which
is not what I want.

So I guess what I am asking is: which layout manager will allow me to
stack Components vertically in a JPanel, while respecting the
components preferred size?

BTW, I also tried BoxLayout, but it treated JButtons and JSliders
differently.


Quantcast