I have the following code of JButton in Java:
enterButton = new JButton("Enter");
enterButton.setMnemonic(KeyEvent.VK_ENTER); // Shortcut: Alt + Enter
The question is simply: Instead of having the shortcut "Alt+Enter", how do I set a shortcut "Enter"?
I simply prefer pressing "Enter" instead of holding "Alt" and pressing "Enter"