This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Align JLabel, JTextField inside TitledBorder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Align JLabel, JTextField inside TitledBorder" Watch "Align JLabel, JTextField inside TitledBorder" New topic
Author

Align JLabel, JTextField inside TitledBorder

albert kao
Ranch Hand

Joined: Feb 04, 2010
Posts: 245
How to align JLabel & JTextField which are outside a TitledBorder with the JLabel & JTextField which are inside a TitledBorder?
My simplified Swing test program is as follows.
I use GridBagLayout for more powerful control.
i.e. how to align lastNameLabel with cityLabel & streetNumberLabel,
lastNameText with cityText & streetNumberText?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Align JLabel, JTextField inside TitledBorder
 
Similar Threads
align JLabels and JTextFields vertically in different areas
ActionListener problems
JTextArea Problems
JScrollPane Problem
setEditable(true) function of jcombobox not working