aspose file tools*
The moose likes Beginning Java and the fly likes Menu 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 » Beginning Java
Bookmark "Menu" Watch "Menu" New topic
Author

Menu

Brian Snyder
Ranch Hand

Joined: Feb 03, 2001
Posts: 142
Heres my code:


As it is now. I am able to create a menu bar with a heading "file". When the user clicks
on "file" the menu pops up and they can actually select one of four choices; I only have
one of them listed here,"review".
How do I add a submenu to review? I want to add two options("Test" and "Tutorial") that
pop up when the user's mouse lands on the word "Review..". The API said that I should
use" ..... submenu is an instance of Menu." .
I need some code to help me out. I played around with add() with no success.
Thanks in advance.
Siva Prasad
Ranch Hand

Joined: Feb 22, 2001
Posts: 104

Hi Brian
To get the affect what you wanted, you just need to add a 'Menu' object to the menu bar instead of 'MenuItem'
So the code looks like this...

Hope this helps
cheers
Prasad
Brian Snyder
Ranch Hand

Joined: Feb 03, 2001
Posts: 142

this now produces:
-Test
-Review
-Option 1
-Option 2
-Option 3
(The indentation didn;t work, but I got what I wanted!!!)
It seems so obvious now. I guess I was looking at it too long. Thanks for the help. This is how I feel now.
[This message has been edited by Brian Snyder (edited March 06, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Menu
 
Similar Threads
Creating one class from another
Still not working..help please.
Good design or should I try something else
Menu question
Help please