6

I'm trying to use a transparent PNG as the icon for my Java application. The image on the JFrame and task bar work great. However, when I use the image with a TrayIcon, I get a black matte background around the edge of the PNG.

Has anybody else come across this issue? I would really like to use a PNG instead of GIF or JPEG.

1 Answers1

1

With Java6, a PNG picture should be used for TrayIcon, but as mentioned in this SO question, check:

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • The `TrayIcon` constructor takes an image. Are you sure that Java can create an image from an SVG file? – Mot Aug 10 '10 at 11:34
  • @mklhmnn You are right, but with a Java library like Batik , you can create an Image from a SVG file. See also thread http://markmail.org/message/pfcceqjgy2mxvy6m – VonC Aug 10 '10 at 14:23
  • @mklhmnn: not tested. And the OP didn't return to give us any feedback. Do you have any new element to add to this issue? – VonC Aug 10 '10 at 18:18