File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes PupMenu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "PupMenu" Watch "PupMenu" New topic
Author

PupMenu

Herbert Maosa
Ranch Hand

Joined: May 03, 2000
Posts: 289
Hie, folks
I am new on this forum and I hope my subject does fall in the right place. I was trying to attach PopupMenus to a component in an applet. I can do this quite oky, but I have a problem getting rid of the popmenu. To show it I am basically using the show() method of the Popupclass, but I just can not find a method to get rid of it when I am done with it. Could someone help ?
Tom P
Ranch Hand

Joined: May 06, 2000
Posts: 88
How about setVisible(false)
Herbert Maosa
Ranch Hand

Joined: May 03, 2000
Posts: 289
Tom,
Apparently PopupMenu has three methods only and setVisible() is not one of them. I think this method is from the Component class and PopupMenu does not descend from this heirachy, so it does not inherit it.
Herbert.
Tom P
Ranch Hand

Joined: May 06, 2000
Posts: 88
Actually I was thinking of the JPopupMenu which does support setVisible(). The PopupMenu is designed to stay visible until the user clicks anywhere outside of the PopupMenu. There is no way to hide it once it is displayed.
Pawel Veselov
Ranch Hand

Joined: Jan 14, 1999
Posts: 165
One more idea - since PopupMenu is a grandchild of a MenuComponent you can post some event to make it disappear. Just a suggeston.

With best of best regards, Pawel S. Veselov ( aka Black Angel )
Tom P
Ranch Hand

Joined: May 06, 2000
Posts: 88
You could delete all the menu items from the PopupMenu.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PupMenu
 
Similar Threads
Page appears only on refresh
How to achieve Connection polling in JDBC
adEjbModule error
Spring Requirements
Error in Struts2 application