Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
import java.awt.*;
import java.awt.event.*;
class repro {
public static void main(String[] args) throws Exception {
SystemTray tray = java.awt.SystemTray.getSystemTray();
Image image = java.awt.Toolkit.getDefaultToolkit().getImage("");
TrayIcon trayIcon = new TrayIcon(image, "name", null);
trayIcon.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
System.out.println("in here " + evt.getActionCommand() + " " + evt.getModifiers() + " " + evt.paramString() + " " + evt.getID());
trayIcon.displayMessage("title", "try clicking within the baloon, but not the x, then double clicking the tray icon", TrayIcon.MessageType.INFO);
System.out.println("try clicking within the balloon message, or double clicking, both seem to generate the same event");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.