dcsimg

When does one use the MenuKeyListener?

Vishwajeet Wadhwa

Menu Key Listener is used to access the Menu item using the short key

You can do this by this also


JMenuItem item = new JMenuItem("Item");
 
item.setAccelerator(KeyStroke.getKeyStroke(
    KeyEvent.VK_I, KeyEvent.SHIFT_MASK));