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
public void actionPerformed(ActionEvent arg0) { if (arg0.getSource()==clearButton) { enterText.setText(null); enterText.grabFocus(); //Places flashing cursor on text box } }