I make my game run without mouse so using pointer is not a choice. High Score menu will show when player lose.
this is my code
highScore=new MyTe
Try this one,
myFrame.setVisible(true); EventQueue.invokeLater(new Runnable() { @Override public void run() { myComponent.grabFocus(); myComponent.requestFocus();//or inWindow } });