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.

Hi
The focus is probably lost because there is a new event that gets focus and you have not programmed it clear enough to keep focus on the first event until that is finished.
The easiest way is to "force" the player by disable every other possibility except the one you want them to use.

It feels a bit confusing not knowing where to enter the char. You look around to see if a marker shows up or a field is marked up by a frame or something. This kind of confusion can make the player to do something "wrong" or unexpected.

Take a look at your event handling statements.
Good luck =)

The player is not suppose to enter the cononant in "anywhere". They are just to simply enter a char from the keyboard.
I'm not sure how to make that more clear other than say "Enter consonant from the keyboard:"

This article has been dead for over six months. Start a new discussion instead.