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:
display.setState(JFrame.ICONIZED); display.setState(JFrame.NORMAL);
Is there any way to make this work? Thanks in advance, john murano
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.
My guess is that currently they are: