Skip to content

@rdp /repro.java
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
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);
tray.add(trayIcon);
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.