aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Popup on titlebar of JInternalFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Popup on titlebar of JInternalFrame" Watch "Popup on titlebar of JInternalFrame" New topic
Author

Popup on titlebar of JInternalFrame

Mike Dahmus
Greenhorn

Joined: Mar 07, 2002
Posts: 29
Hi folks,
I have a rather peculiar need in a JInternalFrame subclass to be able
to react to right-mouse-button clicks on the titlebar (and presses) by
displaying a context menu (JPopupMenu).
I've gone through the typical path to locate the titlebar and can get
my popup to display through a mouselistener; but it immediately
disappears when I release the mouse (I presume the frame's UI delegate is also listening and
turning the event into a drag or window-raise; which makes the popup disappear).
Can anybody suggest a quick and simple way to get at the code in the
UI which listens for mouse events, so I can override it in my subclass
and avoid passing it on if the click was from the right mouse button?


-----Mike Dahmus mike@dahmus.org
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Popup on titlebar of JInternalFrame