user819774
user819774

Reputation: 1514

What is KeyEvent.VK_1

I found an example on the web to create a tabbedPane. The example has the code like as bellows

tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);  
tabbedPane.setMnemonicAt(0, KeyEvent.VK_2); 

Would you tell me what key in the keyboard to have action for KeyEvent.VK_1 and KeyEvent.VK_2?

I want to use "Tab" key in the keyboard to switch the panel in the tabbedPane. Would you tell me how. Thanks in advance

Upvotes: 1

Views: 2969

Answers (1)

pgreen2
pgreen2

Reputation: 3651

VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39)

[http://docs.oracle.com/javase/7/docs/api/java/awt/event/KeyEvent.html]

Tab is VK_TAB

Upvotes: 5

Related Questions