I have a JLabel associated with a textfield. I want to set VK_COLON mnemonic key for JLabel. However just by calling the method setMnemonic(KeyEvent.VK_COLON); and setLabelFor(myTextField) isnt helping me to get focus in textfield. I guess this involves the use of ALT and SHIFT key combination. So is there any way to set colon mnemonic key ?
I added the "alt" word in the above statement and now it is working with ALT + SHIFT + COLON. However I noticed that the actionPerformed method is getting called but the focus is not getting set in the textfield. When I explicitly wrote textField.requestFocus(); in actionPerformed then the textfield got the focus else it is not receiving focus.
Please correct me if I am wrong.
Thanks and Regards Rohit.
They weren't very bright, but they were very, very big. Ad contrast: