The actionPerformed method
The code in the actionPerformed
method
- is executed each time the user presses the Move button.
The actionPerformed method in Listing 7 begins by
- getting the text from each of the text
fields,
- converting the text to type int,
- and saving the int values
in the variables named angle and distance.