Notification.java
public void notification() {
SystemTray tray = SystemTray.getSystemTray();
Image image = Toolkit.getDefaultToolkit().createImage(
getClass().getResource("Appropriate image.png "));
TrayIcon trayIcon = new TrayIcon(image, "Tray Demo");
trayIcon.setImageAutoSize(true);
trayIcon.setToolTip("System tray icon demo");
tray.add(trayIcon);
trayIcon.setImageAutoSize(true);
trayIcon.displayMessage("Hello, World",
"notification demo", MessageType.INFO);
}
At the bottom is AppId, and the TrayIcon class doesn't seem to provide that operation API.
Recommended Posts