Accelerator « Menu « Java Swing Q&A





1. Can multiple accelerators be defined for a JMenuItem?    stackoverflow.com

I've a problem with setAccelerator(). Right now, I have the code that works for Ctrl+X for DELETE operation. I want to set the accelerator to Shift+Delete as well for same JMenuItem. My ...

2. Can we set multiple accelerators for a JMenuItem?    stackoverflow.com

I have my code as follows (Modified). Created action myCutAction1 similar to myCutAction and passed it to createAction() method.This method setting the accelator to keystrokes as shortcuts using item.setAccelerator(aShortCut); The problem is.. ...

3. override display appearance of accelerator keys in JMenuItems in Java/Swing    stackoverflow.com

I've noticed that on some macs the JMenuItem uses the word "space" to indicate that the space bar is the key binding. On other macs a symbol is used (looks like ...

4. Java: How to create a paste MenuItem with accelerator?    stackoverflow.com

When I create a JMenuBar with a Paste action in it and assign an accelerator to it (Control - V) and I write the paste action for the JMenuItem. AND I ...

5. Do JMenuItem Accelerators function properly when in a frame opened by another frame?    stackoverflow.com

I have one frame that opens up another frame (editor). Most of the menu accelerators don't work when opened this way, but when I run the editor frame standalone, they ...

6. Swing accelerators : inputMap or menu?    stackoverflow.com

I want to add an accelerator to a component, say undo/redo (Ctrl-Z, Ctrl-Y) to a JTextComponent, but would like to show the action and its shortcut command in a JMenu, should ...

7. How to have a menu accelerator with plus or minus signs in Swing?    stackoverflow.com

I have tried setting the accelerator of a JMenuItem using the following :

item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_PLUS, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
The menu item shows the shortcut ?+ (on a mac) but hitting these two keys won't trigger it. ...

8. How to bind command-? as a swing action accelerator for a help menu?    stackoverflow.com

The standard key combination for help is command-? on macs. How can I bind this key combination to a menu item. Note: As our users have different keyboard layouts I´m looking ...

9. JTabel and JMenuItem accelerators    coderanch.com





10. MenuItem Accelerators stops working    coderanch.com

11. JMenuItem Accelerators does not work with me    coderanch.com

Well i think i am using a normal JTable ... Nothing special. DefaultTableModel myTableModel = new DefaultTableModel( new Object[][] { }, new String[] { // Table headers(Get them from the bundle file) : "CheckBox Field", "Text Column" } ) { @SuppressWarnings("unchecked") Class[] columnTypes = new Class[] { Boolean.class, String.class }; @Override public Class getColumnClass(int columnIndex) { return columnTypes[columnIndex]; } }; I ...

12. Accelerator keys for Pop Up menu-items    coderanch.com