Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need help with Java: How to Program Early Objects 10th edition, chapter 12 exercise 20 please. There was no solution posted. It is the typing
Need help with Java: How to Program Early Objects 10th edition, chapter 12 exercise 20 please. There was no solution posted. It is the typing GUI that requires a user to type out a sentence on the screen.
Thank you.
12.20 (Bping Tutor: Tuning a Crucial Skill in the Computer Age) Typing quickly and correctly is an essential skill for working effectively with computers and the Internet. In this exercise, you'll build a GUI application that can help users learn to "touch type" (i.e. type correctly without look- ing at the keyboard). The application should display a virtual keyboard (Fig. 12.50) and should al low the user to watch what he or she is typing on the screen without looking at the actual keyboard. Use JButtons to represent the keys. As the user presses each key, the application highlights the cor- responding JButton on the GUI and adds the character to a JTextArea that shows what the user has typed so far. Hint: To highlight a JButton, use its setBackground method to change its background color. When the key is released, reset its original background color. You can obtain the JButton's original background color with the getBackground method before you change its color. Type some text using your keyboard The keys you press will be highlighted andthetetwillbe displayed. e Clicking the buttons with your mouse wilnotperform any action. Fig. 12.50 I Typing tutor You can test your program by typing a pangram phrase that contains every letter of the alphabet at least on such as "The quick brown fox jumped over a lazy dog." You can find other ce pangrams on the web. To make the program more interesting you could monitor the user's accuracy. You could have the user type specific phrases that you've prestored in your program and that you display on the screen above the virtual keyboard. You could keep track of how many keystrokes the user types cor- rectly and how many are typed incorrectly. You could also keep track of which keys the user is hav. ing difficulty with and display a report showing those keys
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started