Notification.java
public void notification() {
SystemTray tray = SystemTray.getSystemTray();
Image image = Toolkit.getDefaultToolkit().createImage(
getClass().getResource("Passendes Bild.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);
}
Unten befindet sich AppId, und die TrayIcon-Klasse scheint diese Operations-API nicht bereitzustellen.
Recommended Posts