File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Multiple JMenuItem layout 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 "Multiple JMenuItem layout" Watch "Multiple JMenuItem layout" New topic

Multiple JMenuItem layout

Jack Thomson

Joined: Nov 14, 2002
Posts: 5
I have a situation where it's possible that there may be a whole load of JMenuItems off a JMenu. If there is enough of them, they don't all show correctly.

What's the correct way of handling this ?

As a demo I've knocked up this piece of code...

Matthew Middleton

Joined: May 05, 2004
Posts: 23
How many menu items are you talking about, and why won't they fit? Are they cut off at the bottom, or the window isn't wide enough? Have you thought of maybe categorizing the menu items into different menus? Maybe like the file and edit menus, that way it'll show up and maybe make the user interface a little smoother. Let me know if that helped at all, or maybe if you explain it a little more I can help you better. GOD Bless

Matthew Middleton
Jack Thomson

Joined: Nov 14, 2002
Posts: 5
Thanks for your reply. The problem is that they cut off at the bottom...

After consideration, I think my solution will be to break up the JMenuItems into seperate menus.

I agree. Here's the link:
subject: Multiple JMenuItem layout
Similar Threads
Resize problem with JMenuBar
Arrow Keys not working in JMenu
JMenuBar not using default alignment?
Saving table data and using agen - JTable
Things arn't showing up...