Hi, I am currently in a introducory programming class in highschool, and we are doing java applets.
For the assignments we are doing simple arcade games like brick breaker, but when we run them we have to click on the screen to focus the window in order to use the keyboard.
Is there something I can do to eliminate the need to click. I am not too sure but from googling I think I need to implement a WindowFocusListener but I am not sure how to do it just to focus on the window in these simple applets.
Thanks in advance
For the assignments we are doing simple arcade games like brick breaker, but when we run them we have to click on the screen to focus the window in order to use the keyboard.
Is there something I can do to eliminate the need to click. I am not too sure but from googling I think I need to implement a WindowFocusListener but I am not sure how to do it just to focus on the window in these simple applets.
Thanks in advance