Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with KeyListener

 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an applet which, when started, opens a new Frame (called mainFrame).

I have created a KeyListener, and when I set it as the applet key listener, it works fine, but when I add the same KeyListener as mainFrame's key listener it isn't notified of any key events at all.

Maybe I'm missing something really simple - can anyone advise?

Thanks,
James
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!