Hi, I am trying to show more detailed information after a user clicks on the message balloon tooltip.
However, I can't find how to capture that event.
Is this possible to do?
Hi, I am trying to show more detailed information after a user clicks on the message balloon tooltip.
However, I can't find how to capture that event.
Is this possible to do?
Even though this topic isn't exactly recent, I figured I'd share my solution since this kind of thing doesn't really change.
How To Use
To use this code, just create the 1 public class and the 2 public interfaces.
Now create an instance of the CustomTrayIcon class and call the addToSystemTray() method, once you're done initializing it.
Anytime you want to show a notification bubble, call the showBubbleNotification(...) method.
To remove this tray icon, just call the removeFromSystemTray() method.
CustomTrayIcon
This class is the base which does all of the heavy lifting.
CustomTrayIconMouseInterface
This interface is used to externalize various user interactions via the mouse.
CustomTrayIconNotificationBubbleClickEvent
This interface is used to externalize the interaction with the notification bubble.
1) Is possible to listening MouseClickEvents by add ActionListener to the TrayIcon, then Message body listening for MouseClicked
2) (not asked directly) but I can't to give you an answer listening if message was closed by close button, and Message gone away from screen same way, but without catch any event(s)
3) looks like as this Java TrayIcon message close button should be only one solutions, because API doesn't implements another methods,