Modify the temperature conversion program so that it responds to the user’s press of the return or enter key. If the user presses this key when the insertion point is in a given field, the action which uses that field for input is triggered. Be sure to use the field names provided in the comments in your starter code. An example of the program is shown below: GUI TestIncomplete 30 Celsius to Fahrenheit GUI TestIncomplete 68 Fahrenheit to Celsius Bind the Enter (Return) key to the celsiusField and the fahrField. When the Enter or Return key is pressed the GUI should convert the value of whichever field is in focus. Code PatternIncomplete Bind the Enter (Return) key to the Celsius field Code PatternIncomplete Bind the Enter (Return) key to the Fahrenheit field Temperature Converter GUI
Modify the temperature conversion program so that it responds to the user’s press of the return or enter key. If the user presses this key when the insertion point is in a given field, the action which uses that field for input is triggered.
Be sure to use the field names provided in the comments in your starter code.
An example of the program is shown below:
30 Celsius to Fahrenheit
68 Fahrenheit to Celsius
Bind the Enter (Return) key to the celsiusField and the fahrField. When the Enter or Return key is pressed the GUI should convert the value of whichever field is in focus.
Bind the Enter (Return) key to the Celsius field
Bind the Enter (Return) key to the Fahrenheit field
Temperature Converter GUI
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images