public JfxTrayIcon() {
if (!SystemTray.isSupported()) {
log.warn("system tray not supported!");
this.tray = null;
} else {
this.tray = SystemTray.getSystemTray();
this.menu = new PopupMenu();
this.exit = new MenuItem("Exit");
this.menu.add(exit);
this.exit.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
hide(); // important, otherwise AWT keeps application alive!
Platform.exit();
}
});
}
}
JfxTrayIcon.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:rapfx
作者:
评论列表
文章目录