Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java System Tray Icon on MacOS 10.7.4 not showing animated gif

I'm trying to get an animated gif to appear in the MACOS System Tray using Java. I have PNG icons showing corretly, but as soon as I try and set the icon to an animated gif (so I can show a spinning timer) it goes blank and shows nothing in the system menu tray.

According to the JavaDocs for the System Tray class, setImage should automatically support animated images if given but it doesn't specify the image format or anything else required to get animated icons in the system tray.

Does anyone know how to get this working?

like image 545
dgildeh Avatar asked Jul 07 '12 10:07

dgildeh


1 Answers

Chances are this problem cannot be resolved with the java.awt.SystemTray class. The only option you have is to try JDIC which uses native code. Frankly I'm not sure whether the JDIC project is maintained anymore, it is quite hard to find information on the web...

In a project of mine I used JDIC do integrate the system tray. You can use it as starting point and get the libraries from there, if you can't find any other resources.

like image 159
Adrian B. Avatar answered Oct 19 '22 07:10

Adrian B.