I am having problems with a gui that I am writing. The gui has a dialog box which has a couple of jpanels. One panel has a its layout set to boxlayout and is set to Y_AXIS(top to bottom). The panel contains a JLabel and a JTextArea. There are 4 of these(JLabel and JTextArea components) in the panel.
When I run the code the labels are not aligned to the left. The textarea is but not the labels! No matter what I do I cant align them to the left.
Can someone please tell me what I doing wrong?
Read the section from the Swing tutorial on "How to Use BoxLayouts". It goes into detail explaining how alignments works and has examples to demonstrate the behaviour.