JDK-6453521 : TrayIcon should support transparency
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6,7,8
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • CPU: x86
  • Submitted: 2006-07-27
  • Updated: 2017-07-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbd_majorUnresolved
Related Reports
Relates :  
Description
A DESCRIPTION OF THE REQUEST :
TrayIcon gets a grey background instead of a transparent one. We have reproduced this on Gnome (2.14.2) and KDE3.

JUSTIFICATION :
TrayIcon supports transparency on Windows (at least on XP)

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Transparent background of TrayIcon on all platforms / windowing systems

Comments
jdk8: SQE ok to defer!
2013-09-19

This is not a bug, but Enhancement. The vote rate is high due to bug age (from July 2006)! Definitely a feature for jdk9. We passed FeatureComplete for jdk8
2013-09-19

Developers want this bug to be fixed. "The number of votes at bugs.sun.com is 124(!)"
2013-09-19

EVALUATION AWT TrayIcon API allows to set an animated image to tray icons. Every frame of animation is drawn over the previous one, this is implemented by clearing the whole rect of icon and drawing the new frame after this, otherwise we get a wrong image as described in 6267936. The color for clearing is obtained with getBackground(), so a grey rect appears. For details see the code for XTrayIconPeer.IconCanvas.paint() at XTrayIconPeer.java:517: gr.setColor(getBackground()); gr.fillRect(0, 0, curW, curH); <-- here the grey rect appears gr.drawImage(image, 0, 0, curW, curH, observer); gr.dispose(); I'm not sure if we can query KDE or GNOME about underlying panel color. Furthermore, that panel may have an arbitrary background image, so the best way to fix this bug is to query KDE or GNOME to repaint the panel below the tray icon, but I'm not sure if such API is available to AWT.
2006-07-28