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
In my case nothing above worked untill I called requestFocus() AFTER my constructor has returned.
MyPanel panel = new MyPanel(...); frame.add(panel); panel.initFocus();
MyPanel.initFocus() would have:
myTextField.requestFocus();
And it works.