(Draw lines using the arrow keys) Write a program that draws line segments using the arrow keys. The line starts from the center of the pane and draws toward east, north, west, or south when the right-arrow key, up-arrow key, left arrow key, or down-arrow key is pressed, as shown in Figure 1b.
FIGURE 1 (a) Exercise displays the mouse position. (b) Exercise uses the arrow keys to draw the lines.

We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.