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 JMenu/Sub-menu creation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JMenu/Sub-menu creation" Watch "JMenu/Sub-menu creation" New topic

JMenu/Sub-menu creation

Karen Baog
Ranch Hand

Joined: Mar 02, 2005
Posts: 120
Hi everyone!

Her I am again, soliciting help, whilst I'm learning this new Java language.

I'm trying to create a menubar.
As my instructor insists on hard-coding everything, and not do any drag/drop methods, I tend to end up with so many problems. And here's one: the sub-menu has this right-pointing arrowhead (as if there's more sub-menu listing available).

Here's a snippet of code, and please tell me what I should do.

The result I get is, when I click the File menu:

Save >

So, there's this right-pointing arrowhead.

amerzil co-ed student<br />"Praise be the Code"
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Moving to Swing...

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
James Carman
Ranch Hand

Joined: Feb 20, 2001
Posts: 580
You're adding a menu to a menu which will cause that to happen. Try adding a JMenuItem for the Save command.

James Carman, President<br />Carman Consulting, Inc.
I agree. Here's the link:
subject: JMenu/Sub-menu creation
It's not a secret anymore!