FlowLayout and JLabel JTextfield

Hi everyone,

i wrote an app that creates a UI dynamically by reading in an xml file. So for every element in the xml file there is a JLabel and e.g. a JTextfield. To add it to the JPanel i use FlowLayout. But now my question: sometimes it happens that a JLabel is added to one row and the textfield is in the next row. Is there a simple way to ensure that the label and textfield are together in one row?

Thanks

Chris

[442 byte] By [abenstexa] at [2007-11-26 17:36:05]
# 1
hi,use GridLayout or BoxLayout
dayanandabva at 2007-7-9 0:04:10 > top of Java-index,Desktop,Core GUI APIs...