This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes BoxLayout quirk 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 "BoxLayout quirk" Watch "BoxLayout quirk" New topic

BoxLayout quirk

Eric Larsen
Ranch Hand

Joined: Mar 28, 2009
Posts: 35
Why does my my JLabel appear all the way on the right-hand side of my GUI?

The source code for the class:

Attached is a screenshot of the GUI output.

[Thumbnail for Wessenger_screen.JPG]

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
add these lines


comment out this line

and they'll all be left-aligned
I agree. Here's the link:
subject: BoxLayout quirk
Similar Threads
panels not displayed fullly in Jframe
Help with Chat software
How to implement editable field in table to restrict to accept fixed length
Getting information into a JTable from a drawing Canvas
Why are my JFrames closing?