Hi,
I tried a BoxLayout (within another, within another) for an approach to what I want to do, and having some trouble. I do not know why some things do not want to left-align here. I would like it if I could rely on being able to pile on 6 or 8 controls per panel, where they would be on the left margin all the way down (but the I want to use emptyBorder to add indentation on the left end as well). But when I put a JSpinner in there, it would not line up on the left. I also see that when I put a control in a panel and put the panel in the panel, it is not the same left-right as if I just put the control in the (outer) panel. Here's a pic...http://bwsgames.org/creategame.jpg

And the code that made it. What should I do to get it on the left margin going down? (And add some indenting of radio buttons, check boxes, and spin controls, or a jlabel+spin control line as one line, with this left-margin-related behavior?)

See the following link: Box (Java Platform SE 6)
I recommend playing with some of the methods and nesting some of the layouts. For example, add checkBox1 to a horizontal Box, then add a horizontal glue to said box, and add that Box to the parent JPanel.

04-19-2011, 02:12 AM

camickr

You will want to make sure all your components have the same alignment: