Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Register Key to a JFrame  RSS feed

 
Flavio Nobili
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I've been trying to use the ESC key to close my application window, but it doesn't work. I have used a code like the following:

Why doesn't it work?

Regards,
Fl�vio.
 
Don Kiddick
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the first line of the API for registerKeyboardAction :
This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior

D.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!