Package java.awt

Examples of java.awt.TrayIcon.addActionListener()


    final TrayIcon trayIcon = new TrayIcon(IconHelper.getProductLogoImage(), "double click here to open Dot Project Client", popup);
    final SystemTray tray = SystemTray.getSystemTray();
    trayIcon.setImageAutoSize(true);

    trayIcon.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        frm.setVisible(true);
        frm.setExtendedState(JFrame.MAXIMIZED_BOTH);
        tray.remove(trayIcon);
      }
View Full Code Here


    ImageIcon icon = new ImageIcon(
            MainFrame.class.getResource("/images/flag-16.png"));
    final TrayIcon trayIcon = new TrayIcon(icon.getImage(),
            Constants.PROJECT_NAME);
   
    trayIcon.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        restoreFrame(mainFrame);
      }
View Full Code Here

    catch (Exception e)
    {
      // TODO: handle exception
    }
   
    trayIcon.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        if (!mainFrame.isVisible())
        {
View Full Code Here

        }
      });
      popup.add(popupItem);

      icon.setPopupMenu(popup);
      icon.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          MainWindow.this.setVisible(true);
          MainWindow.this.setState(JFrame.NORMAL);
          MainWindow.this.toFront();
        }
View Full Code Here

                setVisible(true);
            }
        };

        trayIcon.setImageAutoSize(true);
        trayIcon.addActionListener(actionListener);
        trayIcon.addMouseListener(mouseListener);

        try
        {
            tray.add(trayIcon);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.