• Post Reply Bookmark Topic Watch Topic
  • New Topic

JPopupMenu difference between 1.3 and 1.4.1?  RSS feed

Mike Dahmus
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
While testing a swing app I've been previous running inside JDK 1.3 (in JBuilder), I've come across what seems to be a serious behavioral difference in JPopupMenu...
My app is building a look-alike of the Windows Start Menu, which consists of a JPopupMenu with a bunch of submenus and menuitems and whatnot; and as part of this I also want to display a window to the side of the popup.
In order for my side window to be linked visually with the popup, and obviously it needs to go away when the popup disappears, I'm listening for the popupWillBecomeInvisible event. In most cases, this is a result of a menu selection, but could also be a click outside the menu (which cancels the popup and needs to also result in hiding the side window).
In 1.3, this only happens when the main popup is closed, which is great; this is when I want to also get rid of my side window.
However, in 1.4.1, this event gets fired if I select one of the submenus from the main popup. My side window thus disappears prematurely.
Anybody know anything about this change?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!