• Post Reply Bookmark Topic Watch Topic
  • New Topic

'Global' keylistener

 
Jesper Ottosson
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a tiny game i'm making, i would like ALL KeyEvents to go to the same KeyListener, no matter which component has the focus. I also want the KeyListener to receive an event even if no component at all has the focus.
How would i do this?
 
Jesper Ottosson
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind, no more than a few seconds after i posted the msg, it occured to me how to do it. I just added the listener to the frame. duh
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!