|
-
Mar 25th, 2004, 05:34 AM
#1
Thread Starter
Banned
I need help with KeyEvent registered to a JTextField
I have a textfield which has the focus and has a KeyListener... The user can click any key on the keyboard... But some key's like the '=' key has a special function (a dialog will open)... How do I go about this having to open the dialog while the key is not explicitly placed in the JTextField (much like that of the Cancel key of Visual Basic where the key is not rendered to the field...)
is it enough to just do the following code?
ke.setKeyChar(KeyEvent.UNDEFINED_CHAR);
or
ke.setKeyCode(KeyEvent.VK_Cancel);
Please I need help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|