JfxTrayIcon.java 文件源码

java
阅读 20 收藏 0 点赞 0 评论 0

项目:rapfx 作者:
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();
            }
        });
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号