wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Cant get BoxLayout to work right !! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Cant get BoxLayout to work right !!" Watch "Cant get BoxLayout to work right !!" New topic
Author

Cant get BoxLayout to work right !!

Thang Pham
Ranch Hand

Joined: Jan 21, 2009
Posts: 35
I try to create GUI but something is not right here. The button "Sort" and "Show Content", I want them to be on the line, but they are on different line, Not sure why??
Here is my code, the part about the button is toward to the end



pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
What do you mean by you want the buttons "on the line"? Do you want them both on the same line at the bottom? If so, then put them in their own JPanel and then add that button panel to the main panel.
Thang Pham
Ranch Hand

Joined: Jan 21, 2009
Posts: 35
Thanks, I got it right now.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Cant get BoxLayout to work right !!
 
Similar Threads
double to text
AWT FlowLayout to BorderLayout
java.lang.Error: Unresolved compilation problem: ModalityType cannot be resolved
JFileChooser override
socket, gui, thread - problem