key input ignored after click on jframe

hi,

i have a strange problem with my game window (jframe):
when i click inside the game window after the game has loaded it somehow loses it’s focus. i cannot start the game because any key inputs are ignored. if i don’t click everything runs normal. the game is located here:
http://www.cocktailz.org/nb.html

has anyone got this sort of problem before? ???

the problem occurs since i changed from a Canvas to a JFrame.

never mind, was able to fix it :slight_smile:

How did you fix it? I’ve been having this problem :stuck_out_tongue:

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=2D;action=display;num=1106389224

Two answers there. A) add the listener also to the other component or B) use setFocusable(false) on the other component.