I am writing a small game, with one JFrame that holds the main game, and another JFrame that displays the score. the problem is, when I am done constructing them, the score JFrame always ends up focused! I have tried calling scoreDisplay.toFront(), scoreDisplay.requestFocus(), and even:
Have you consider setting the score in the same frame as the game frame?
Other possible ( quick and dirty ) option is to create them in reverse order, or at least ( if score depends on game ) display them in reverse order.
score.setVisible( true ); game.setVisible( true );
My guess is that currently they are:
game.setVisible( true ); score.setVisible( true );