Listening KeyEvent from two JPanel
Ok, from my previous post, I managed what I wanted to do for inner issues.
But now I switched to CardLayout for a different game. I again have many JPanels and a game which itself is a JPanel too. When I switch to Game panel, due to hierarchy I cannot go to previous panel. This time I have to hold Game panel for changing settings and save/load operations too. With CardLayout, I can hold all created Panels present.
However, when I want to go back to menu, I press ESC and since only Game panel hold focus, and I cannot reach cardLayoutPanel to give the show menu command.
Is it possible to share focus?