loosing KeyEvent completely!! someone plz help meeeee

Hi all, I know that this question is a little stupid but, plz show me some ways to resolve the problem :-* …

Im currently developping a tile-based game with 2 system , one for MENU and the other is GAME STAGE.

Both of these system are JFrame in Full Screen mode.

If I test each module independently, everything is alright… but the problem occurs when joining them together :

When switching from MENU to GAME STAGE SYSTEM, I can’t control the game character, the Key Event seem to be thrown to the moon :stuck_out_tongue: :P… hu hu. I guess that the current window lost its focus, but when checking it by “frame.isFocusable()”, the result is TRUE

Plz show me some solutions…

PLZ help me, thanks you so much

Draw each to a different JPanel. Then use the correct JPanel in the JFrame. This way you will only use 1 JFrame. This may solve your problem.

Ohm thanks GOD, finally I destroyed my stupid bugs.
The problems are not in extending JFrame, Just because I covered the little AWT event dispatching thread :-[, and lacking use of requestFocusInWIndow()…

phuuu…`… thanks to shigsy and tom, I didn’t read your topic at the first time. ;D , thank CaptainJester for replying me, too