Menu HotKeys for ?

Hi,

Is there any way I can specify 'hot keys' for the menus with '?' caption.

I can define hot keys for S hot key thro' the following code fragment :

javax.swing.JMenu menuName=new javax.swing.JMenu();

menuName.setMnemonic(KeyEvent.VK_S);

But don't know how to do for ?

Any suggestion of great help

Thanks,

Pankaj Chomal

[389 byte] By [chomal_pankaj] at [2007-9-26 4:29:53]
# 1

for this you have to define your own keycode, because in every keyboard-table the '?' is on another key, so you will not be able to say where the constant for the '?' is settled.

Best way is to parse the ascii-code , get the number of the char representing '?' and then using key_undefined to control whether '?' or not

regards

swingfreak at 2007-6-29 17:41:41 > top of Java-index,Archived Forums,Java Programming...