aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes buttons...flow layout? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "buttons...flow layout?" Watch "buttons...flow layout?" New topic
Author

buttons...flow layout?

Brandi Love
Ranch Hand

Joined: Sep 19, 2003
Posts: 133
I want to format some buttons in a window so that two of them appear on lines by themselves, while others are lined up at the top. Here is how I have them lain out in my program I'm working on now...

I want to format it so that the above average and property buttons aren't lined up together, so that they are on seperate lines. Can this be done?
A. Wolf
Ranch Hand

Joined: Sep 28, 2003
Posts: 57
what I would do if I had to do what you are doing, I would create a new GridLayout with 4 rows and 1 column, and then create 4 panels using flowlayout, add the first 3 buttons to the first panel, the next 3 buttons to the second panel, then the above average button to the third panel, and the poverty button to the last panel, and then add the four panels in order to the frame or window or whatever you're using.
for some reason I keep thinking you're really looking for a MenuBar?
Brandi Love
Ranch Hand

Joined: Sep 19, 2003
Posts: 133
whats a menu bar?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15292
    
    6

Originally posted by Brandi Love:
whats a menu bar?

I assume you are using Internet Explorer, Mozilla, Netscape, or some varient there of to browse the web. Or that maybe you have used a program like MS Word, Excel, anyway....
A menu bar is that bar at the top of those applications that are:
File Edit View Tools Help, etc
You click on them and a drop down appears with other menu choices.
SWING has a component called JMenuBar which is exactly that. A bar with Menu Items on it, just like in other Windows/Linux applications.
Here is a good tutorial on JMenuBars in SWING.


GenRocket - Experts at Building Test Data
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: buttons...flow layout?
 
Similar Threads
Simple Swing
Which layout manager?
Grains again
Message Box??
Displaying an image in a subpanel