Java JMenu CTRL+C shortcut not working
I'm trying to use Ctrl+C
, Ctrl+X
and Ctrl+V
as Swing JMenu
shortcut using NetBeans Visual Designer in my app. All of other shor开发者_运维问答tcuts work except these.
What's the problem?
Those Key Bindings are used by default for text components. So if focus is on a text component they will invoke the default Action for the text component.
If you need more help then post your SSCCE that demonstrates the problem.
It is pretty hard to guess what the problem is from your description, but let me guess: do you happen to have JTextArea on the same JFrame? It has some neat property called actionMap (setActionMap(), getActionMap()), which probably has these Accelerators registered.
精彩评论