File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes align JLabels and JTextFields vertically in different areas Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "align JLabels and JTextFields vertically in different areas" Watch "align JLabels and JTextFields vertically in different areas" New topic
Author

align JLabels and JTextFields vertically in different areas

albert kao
Ranch Hand

Joined: Feb 04, 2010
Posts: 245
I like to have 3 TitledBorders for 3 different areas of my frame.
Each area has its own components - JLabels, JTextField, etc.
How to align JLabels and JTextFields vertically in different areas?
e.g. for the following test program, how to configure label1, label2, label3 so that their right sides all align vertically and
tf1, tf2, tf3 so that their left sides all align vertically?
Andrey Kozhanov
Ranch Hand

Joined: Mar 12, 2010
Posts: 79
I only could think of using null layout managers and aligning your components manually.
 
 
subject: align JLabels and JTextFields vertically in different areas
 
Similar Threads
Align JLabel, JTextField inside TitledBorder
UrlyBird status bar
setEditable(true) function of jcombobox not working
GridBagLayout
JTextArea with varied lengths