public void createTaskTray(String title, Image image, final ITaskTrayEvent event) throws AWTException {
        if (!SystemTray.isSupported() && event != null) return;

        PopupMenu menu = new PopupMenu();
        if (event.synchronizedExitVisibled()) {
            MenuItem exit = new MenuItem("Exit");
            exit.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    event.synchronizedExitEvent();
                }
            });
            menu.add(exit);
        }

        event.menuItems(this.menuComponents);
        for (final MenuComponent component : this.menuComponents)
            if (component instanceof MenuItem) {
                menu.add((MenuItem) component);
                ((MenuItem) component).addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent arg0) {
                        event.runnableMenuItemEvent(component);
                    }
                });
            }

        this.trayIcon = new TrayIcon(image != null ? image : ImageIconBackgroundNone.getNoneItem().getImage(), title, menu);
        this.trayIcon.setImageAutoSize(true);
        this.trayIcon.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
                if (SwingUtilities.isLeftMouseButton(e)) event.runnableEvent();
            }
        });
        this.taskTray.add(this.trayIcon);
    }