Notification.java
public void notification() {
SystemTray tray = SystemTray.getSystemTray();
Image image = Toolkit.getDefaultToolkit().createImage(
getClass().getResource("Image appropriée.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);
}
En bas se trouve AppId, et la classe TrayIcon ne semble pas fournir cette API d'opération.
Recommended Posts