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: 2021-07-13
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
tbdUnresolved
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!
19-09-2013

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
19-09-2013

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

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.
28-07-2006