Java 8 MenuShortcut - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 MenuShortcut class.

This code example shows how to use the following methods:
        aItem.addActionListener(this);
        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);
        fMain.setSize(640, 480);
        fMain.add("Center", this);
        initGUI(); 
 
        sRecent = new String[iMaxRecent];
 
        Dimension d    = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension size = fMain.getSize();
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
		setMenuBar(mb);		// Frame implements MenuContainer
 
		MenuItem mi;
		// The File Menu... 
		fm = new Menu("File");
		fm.add(mi = new MenuItem("Open", new MenuShortcut('O')));
		mi.addActionListener(this);
		fm.add(mi = new MenuItem("Close", new MenuShortcut('W')));
		mi.addActionListener(this);
		fm.addSeparator();
		fm.add(mi = new MenuItem("Print", new MenuShortcut('P')));
		mi.addActionListener(this);
		fm.addSeparator();
		fm.add(mi = new MenuItem("Exit", new MenuShortcut('Q')));
		exitItem = mi;			// save for action handler
		mi.addActionListener(this);
		mb.add(fm);
 
		// The Options Menu... 
		om = new Menu("Options");
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 MenuShortcut Methods: