I just noticed a bug in my game.http://blogfriendlyzone.webs.com/WheelOfFortune/WheelOfFortune.html
To start, scroll down and click start. Then i click on the Spin the Wheel for player 1.
When the wheel stops spinning, it expects a character from the keyboard because i attached a listener to the panel.
But if i click on a button instead like that Show Result (I know it should have been disabled) , it won't accept my consonant i try to enter. It still says "Enter a consonant" in the textarea of player 1.
I also notice if i hide the brower with the game and do something different on that other browser open and but when i bring back up my browser, it no longer lets me enter a consonant. It still says "Enter a consonant" in the textarea of player 1.
For it to run normally, the user has to enter a consonant and then if it appears in the phrase above, it will say # consonants found, then if # is not 0, the user can buy a vowel or spin the wheel again. If the # is equal to 0, then player1 loses turn and game continues with player 2, etc.
I am just wondering how it lost focus and how to bring it back to enter a key even if someone does something odd or unexpected, how to bring back its focus and accept the key a user entered.