I have a File Menu with Several Choices. Two of them being an Import and and Export. Then I have submenus under both Import and export most of the options are the same. i.e. Import --> SQL, Access, Text Export --> SQL, Access, Text What I would like to do is set accelerator keys like this. Import -> SQL -> CTRL + F1 Export -> SQL -> CTRL + SHIFT + F1 I know how to do the first. Any ideas on how to do the second? Thanks
Just use meenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke('E', java.awt.event.KeyEvent.CTRL_MASK | java.awt.event.KeyEvent.SHIFT_MASK, false)); I think accelerator will have the same font as the menu item.