|
-
August 12th, 1999, 09:01 AM
#1
Capturing Tab-cycle
How do I capture key events associated with pressing Tab key ?
-
August 13th, 1999, 06:12 AM
#2
Re: Capturing Tab-cycle
Check for KeyEvent.getKeyCode() method returns a int value equal to KeyEvent.VK_TAB.
Then that event is from the TAB key.
But in JTextField u won't get the event thrown to your Listeners.Because the processKeyEvent catches it and then do the necessary action in the field and won't send this to the listeners.
So if u want to othere processing than the default one provided with swing then u have to overide the processKeyEvent(KeyEvent) method of the component.
Hope this will solve yours.
regards,
arun...
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
|