The Artima Developer Community
Sponsored Link

Java Answers Forum
Creat/building tray icon for a java application

1 reply on 1 page. Most recent reply: Dec 11, 2002 12:50 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Prabhu

Posts: 2
Nickname: feefee
Registered: Dec, 2002

Creat/building tray icon for a java application Posted: Dec 10, 2002 9:50 PM
Reply to this message Reply
Advertisement
Hai..please any one let me know as to how do i build/creat a tray icon for a java application.R we suuposed to use some tools or is it something to do with widows??Please,if possible help me with some demo application.
Thanx


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
Reply to this message Reply
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...

Flat View: This topic has 1 reply on 1 page
Topic: Write Previous Topic   Next Topic Topic: javaspot.net Java resource

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use