Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Show JMenu in multiple columns / Layout question

 
Steve Clark
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2612
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might be interested in Darryl's Menu Scroller.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic