This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes catching keyboard events Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "catching keyboard events" Watch "catching keyboard events" New topic
Author

catching keyboard events

paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20276
    ∞

I've written my own Swing component on top of JComponent. Works great. Especially with the mouse.
I'm trying to put some keyboard stuff in and having a helluva time. Apparently, the AWT stuff won't work. I found something about overriding processComponentKeyEvent(), but that didn't work either. Now I'm working on registerKeyboardAction() ...
Has anyone already been down this path and can part with some advice?

permaculture Wood Burning Stoves 2.0 - 4-DVD set
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20276
    ∞

Okay - I got the registerKeyboardAction() thing working. But now I can't make it work with the tab key. Wuzzup?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: catching keyboard events
 
Similar Threads
Problems with Swing and Swiss keyboard
My aching wrists
key board is not working properly
Setting the cursor in a text field after clicking a button?
WA #1.....word association