Layout Managers

Whats the best layout manager to use? Do you use them all for specific circumstances or do you just use the same one/ones all the time?

I've been trying to make a typical input form with label-text field parings but i can't seem to get it right. I'm not sure whether to have the labels and text fields on the same panel or seperate and also i have problems with some layout managers making all the text fields the same size. Any suggestions for this?

[466 byte] By [Jahvaha] at [2007-11-27 10:51:47]
# 1

I tend to use only BorderLayout and the jgoodies FormLayout.

FormLayout is simple and ideal for laying out, yep you guessed it, forms.

dwga at 2007-7-29 11:33:29 > top of Java-index,Desktop,Core GUI APIs...
# 2

I use the appropriate LayoutManager (or combination of LayoutManagers) for the job.

The SpringLayout has a simple example that might do what your want:

http://java.sun.com/docs/books/tutorial/uiswing/layout/spring.html

camickra at 2007-7-29 11:33:29 > top of Java-index,Desktop,Core GUI APIs...
# 3

Ok thanks. The layout managers i tried were driving me mad. I tried box and grid layout and i just couldn't get them to work the way i wanted them.

Jahvaha at 2007-7-29 11:33:29 > top of Java-index,Desktop,Core GUI APIs...