Package java.awt

Examples of java.awt.MenuItem.addActionListener()


    joinVent = new MenuItem("Join Vent");
    joinVent.addActionListener(listener);
    popup.add(joinVent);

    MenuItem item = new MenuItem("Configuration...");
    item.addActionListener(listener);
    popup.add(item);
    popup.addSeparator();
    item = new MenuItem("Exit Harlequin");
    item.addActionListener(listener);
    popup.add(item);
View Full Code Here


    MenuItem item = new MenuItem("Configuration...");
    item.addActionListener(listener);
    popup.add(item);
    popup.addSeparator();
    item = new MenuItem("Exit Harlequin");
    item.addActionListener(listener);
    popup.add(item);

    baseimage = Images.getImage("/images/harlequin.png");
    trayicon = new TrayIcon(baseimage, Configuration.properties.getProperty("client.title"),
        popup);
View Full Code Here

      pm.add(mi);

      pm.addSeparator();

      mi = new MenuItem("Hide/show");
      mi.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
          setVisible(!isVisible());
          if(isVisible())
            toFront();
View Full Code Here

        }
      });
      pm.add(mi);

      mi = new MenuItem("Exit");
      mi.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
          System.exit(0);
        }
      });
View Full Code Here

        Menu     hMenu = new Menu("Help");
        MenuItem aItem = new MenuItem("About");

        aItem.setShortcut(new MenuShortcut('A'));
        aItem.addActionListener(this);
        hMenu.add(aItem);

        MenuItem hItem = new MenuItem("Help");

        hItem.setShortcut(new MenuShortcut('H'));
View Full Code Here

        hMenu.add(aItem);

        MenuItem hItem = new MenuItem("Help");

        hItem.setShortcut(new MenuShortcut('H'));
        hItem.addActionListener(this);
        hMenu.add(hItem);

        //bar.add(hMenu);
        // Command above disabled only until a help display bug is fixed.
        fMain.setMenuBar(bar);
View Full Code Here

            if (c != '-') {
                item.setShortcut(new MenuShortcut(c));
            }

            item.addActionListener(this);
            f.add(item);
        }
    }

    /**
 
View Full Code Here

        }

        MenuItem item = new MenuItem(s);

        item.setActionCommand("#" + iRecent);
        item.addActionListener(this);
        mRecent.insert(item, iRecent);

        iRecent = (iRecent + 1) % iMaxRecent;
    }
View Full Code Here

    Menu File = new Menu("File");

    item = new MenuItem("New",new MenuShortcut('N',false));
    item.setActionCommand("deleteAllChairs");
    item.addActionListener(menuListen);
    File.add(item);

    item = new MenuItem("Save Chair",new MenuShortcut('S',false));
    item.setActionCommand("saveChairToFileAuto");
    item.addActionListener(menuListen);
View Full Code Here

    item.addActionListener(menuListen);
    File.add(item);

    item = new MenuItem("Save Chair",new MenuShortcut('S',false));
    item.setActionCommand("saveChairToFileAuto");
    item.addActionListener(menuListen);
    File.add(item);

    item = new MenuItem("Save Chair As",new MenuShortcut('S',true));
    item.setActionCommand("saveChairToFile");
    item.addActionListener(menuListen);
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.