Trouble with swing layouts

Hi there

I would like to set up a application, which displays the names of certain text fields above their respected text boxes, but i don't know how to code that kind of layout.

-

Example of what i need:

Subject:(this is the name) [====================== ](Text box)

-

Any help much appreciated!

[362 byte] By [Monoxa] at [2007-10-2 4:59:44]
# 1
the above diagram is incorrect. i ment for the name to be above the text box.
Monoxa at 2007-7-16 1:03:46 > top of Java-index,Desktop,Core GUI APIs...
# 2
The GridBagLayout is the most flexible one.
watfora at 2007-7-16 1:03:46 > top of Java-index,Desktop,Core GUI APIs...
# 3
My advice for is that try to use JBuilder or Netbeans if you are new to Java and if you want to learn it as soon as possible. These software adjust GUI components automatically and you will feel comfort in creating java applicatons.S.M.A.R.T
smarta at 2007-7-16 1:03:46 > top of Java-index,Desktop,Core GUI APIs...
# 4

> My advice for is that try to use JBuilder or Netbeans if you are new to Java and if you want to learn it as soon as possible.

Right, and thats why you've posted a simple question about using a ButtonGroup for your JRadioButtons because you can't figure out how to use the JBuilder GUI. If you really want to learn how to use Swing to the coding yourself.

> which displays the names of certain text fields above their respected text boxes

Whats a text box?

I suggest you start by reading the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html]How to Use Layout Managers[/url]. Start with something simple. Maybe a BorderLayout where the JLabel is in the North and the JTextField is in the South. Or maybe a GridLayout. You can then combine multiple panels each use different layouts into a larger panel. Be creative.

camickra at 2007-7-16 1:03:46 > top of Java-index,Desktop,Core GUI APIs...
# 5
Or for this particular case, you might want to just set a TitledBorder on the textfield.: jay
JayDSa at 2007-7-16 1:03:46 > top of Java-index,Desktop,Core GUI APIs...