wood burning stoves*
The moose likes Swing / AWT / SWT and the fly likes Show JMenu in  multiple columns / Layout question 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 "Show JMenu in  multiple columns / Layout question" Watch "Show JMenu in  multiple columns / Layout question" New topic
Author

Show JMenu in multiple columns / Layout question

Steve Clark
Greenhorn

Joined: Feb 26, 2009
Posts: 8
If there are too many items in JMenu, some of them will disappear. They won't show them in multiple columns like windows.

Now I am using springlayout and calculate rows and rols by items' size. I made the items be showed in multiple columns. But the order is from left to top not vertical like normal menu from top to bottom.

Is there a layout can let items in this order? Boxlayout Y_AXIS is vertical but can I make it multiple columns?
Steve Clark
Greenhorn

Joined: Feb 26, 2009
Posts: 8
Steve Clark wrote:If there are too many items in JMenu, some of them will disappear. They won't show them in multiple columns like windows.

Now I am using springlayout and calculate rows and rols by items' size. I made the items be showed in multiple columns. But the order is from left to top not vertical like normal menu from top to bottom.

Is there a layout can let items in this order? Boxlayout Y_AXIS is vertical but can I make it multiple columns?


solved by myself!

I studied all of the layouts. I almost gave up. Then I found all I need do is modify the SpringUtilities.makeCompactGrid method.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2154
    
    7
You might be interested in Darryl's Menu Scroller.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Show JMenu in multiple columns / Layout question
 
Similar Threads
Beginning GUI programming exercise. Please help to figure out why it does not compile.
drop down multiple selection
JMenu Construction problem
KeyListener in JMenu
Swing Menu item with no children?