Java JMenuItem attachAcceleratorKeyNoCtrl(JMenuItem item, int keyEvent)

Here you can find the source of attachAcceleratorKeyNoCtrl(JMenuItem item, int keyEvent)

Description

attach Accelerator Key No Ctrl

License

LGPL

Declaration

public static void attachAcceleratorKeyNoCtrl(JMenuItem item,
            int keyEvent) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import javax.swing.JMenuItem;
import javax.swing.KeyStroke;

public class Main {
    public static void attachAcceleratorKeyNoCtrl(JMenuItem item,
            int keyEvent) {
        item.setAccelerator(KeyStroke.getKeyStroke(keyEvent, 0));
    }//from www  .  ja v  a  2 s.com
}

Related

  1. addIntoMenu(JMenu menu, JMenuItem[] menuItems)
  2. addMenu(JMenu poMenuPadre, JMenuItem poElemento, int piPosicion)
  3. addMenuItem(final JMenuItem mi, final C topLevelMenu, final List path)
  4. aplicarMenu(JMenuItem loMenuO, JMenuItem loMenuD)
  5. applyDefaultProperties(final JMenuItem comp)
  6. cloneMenuItem(final JMenuItem item)
  7. configureMenuItem(JMenuItem item, Action action)
  8. createJMenuItem(Action action)
  9. createJMenuItem(JMenu menu, String text, int mnemonic, int acceleratorKey, String toolTip, ActionListener actionListener)