Suppose we change the drawJPanel- MouseDragged method to the code below. What happens when the user drags the mouse? Assume that displayJTextField has been added to the application.

```
1 private void drawJPanelMouseDragged( MouseEvent event )
2 {
3 displayJTextField.setText = "I’m at " + event.getX()
4 + ", " + event.getY() + ".";
5
6 } // end method drawJPanelMouseDragged
```


The text in displayJTextField tells the user where the mouse’s cursor is located.

Computer Science & Information Technology

You might also like to view...

What symbol is used in a hierarchy chart for the decision statement?

a. The same symbol as the flowchart. b. A special symbol. c. The hierarchy chart does not show decisions. d. A circle e. None of the above.

Computer Science & Information Technology

Operator error refers to a mistake made by a computer user or programmer.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The part of the Print Preview window that indicates the page displayed and the total number of pages is the ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

With a ____, the direction that the program control takes depends on the results of a certain condition.

A. selection control structure B. sequence control structure C. control structure D. repetition control structure

Computer Science & Information Technology