Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: Creat/building tray icon for a java application
|
Posted: Dec 11, 2002 12:50 PM
|
|
You need to write a bit of JNI for this and use the Windows API function Shell_NotifyIcon() .
I think this may have been covered before in this (or the archived Java Answers Forum) and may have had links to implementations and/or code included. Try searching the forum for more details. Or http://java.sun.com, or http://www.google.com.
This would probably be an interesting thing to implement; since the tray icon needs a callback (when it is clicked, double-clicked, right-clicked, etc.) and since it needs to display menus (usually), the Java app would need to be notified and would need to register menus (probably native windows menus, although I suppose it wouldn't be too hard to pop up a Java menu instead, wherever the mouse pointer is). I've done some JNI to call Windows APIs, but not one that had callbacks...
|
|