Skip to main content

Translucency doesn't work with Swing popup menus under 7

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
2 replies [Last post]
OtherBrotherDarryl
Offline
Joined: 2012-03-21

I just installed and tried out the new version 7 JDK, and the translucency I have applied to JPopupMenus no longer works. It only worked in version 6 when the popup menu region was within the current window, but that was more often than not, and the effect is nice enough that I hate to lose it. Will this get fixed before 7 is officially released? Given that translucent windows are now possible as well, it would be nice if popups could also be translucent regardless of whether they stick outside the window bounds. Drop-shadows would be nice, too...

http://globalisk.com/cascadingslides/screenshots/thumbsize.png

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
anthony_p
Offline
Joined: 2006-07-24

JDK 7 has already been released in July last year [1].

AFAIK, heavyweight popup menus do not inherit transparency settings from its owner frame, as such they look opaque. You may want to file an RFE against Swing at http://bugs.sun.com/ and propose the desired behavior.

[1] http://en.wikipedia.org/wiki/Java_version_history

OtherBrotherDarryl
Offline
Joined: 2012-03-21

Thanks, I guess I meant when version 7 becomes the default version.

I filed an RFE. On further inspection, lightweight popups CAN still be translucent, but only when their parent window is opaque. It's still inconsistent with previous versions, though, and my own application becomes "broken" because it has the option for translucent popups against a translucent window, which adds a richness/depth that I hate to lose...