File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets 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: 20488
    ∞

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: 20488
    ∞

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
WA #1.....word association
Setting the cursor in a text field after clicking a button?
key board is not working properly
My aching wrists
Problems with Swing and Swiss keyboard