我想要一条通知消息,其中2个按钮链接到两个不同的操作(op1和op2)(参见2°图像)。你知道我可以用来达到目标的任何方式(api / java class /免费的第三方应用程序)吗?
我的通知功能是
public static void notify() throws AWTException{
SystemTray tray = SystemTray.getSystemTray();
Image image = Toolkit.getDefaultToolkit().createImage("");
TrayIcon trayIcon = new TrayIcon(image);
trayIcon.setImageAutoSize(true);
trayIcon.setToolTip("Demo");
tray.add(trayIcon);
trayIcon.displayMessage("Hello, World", "notification demo", TrayIcon.MessageType.INFO);
}
这是输出
但我想要这样的东西