alignment of jtextfields and labels in panels

if i have create a number of jtextfields and jlabels to add to a panel does anyone know how i can align the jtexfields and jlabels so that they appear where i want them to on the panel?
[192 byte] By [jonathanca] at [2007-11-27 8:08:53]
# 1
As I don't know where you want them to appear, I don't know how to achieve that.
quittea at 2007-7-12 19:51:54 > top of Java-index,Java Essentials,Java Programming...
# 2
use a layout manager
mkoryaka at 2007-7-12 19:51:54 > top of Java-index,Java Essentials,Java Programming...
# 3
http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html
hunter9000a at 2007-7-12 19:51:54 > top of Java-index,Java Essentials,Java Programming...
# 4
kk well i just need the method to know how to align them. preferably the panel would be at the top of the gui and i would like a label to the left with a jtextfield right next to it
jonathanca at 2007-7-12 19:51:54 > top of Java-index,Java Essentials,Java Programming...
# 5
I guess you posted at the same time I did, but the first link shows you how each layout managers lays out it's components, and the second link shows you how to write the code for them.
hunter9000a at 2007-7-12 19:51:54 > top of Java-index,Java Essentials,Java Programming...
# 6
yea did m8 thanks for sites though
jonathanca at 2007-7-12 19:51:54 > top of Java-index,Java Essentials,Java Programming...
# 7
use a flowLayout or GridLayout with x gridsc.add(panel, BorderLayout.WEST);etc..
deAppela at 2007-7-12 19:51:54 > top of Java-index,Java Essentials,Java Programming...