What would happen if the call to super.paintComponent were removed from the paintComponent method of the RubberLinesPanel class? Remove it and run the program to test your answer. In what ways is the answer different from the answer to Exercise 6.9?
What will be an ideal response?
Without this call, the paintComponent method of the JPanel class is not called, and the background is not cleared and redrawn each time. As a consequence, previously drawn lines remain on the screen. Furthermore, since the lines are drawn over and over again as the mouse is dragged, moving the mouse in a curve causes several different lines to be drawn during one drag.
You might also like to view...
What are the Changing Links panel options?
What will be an ideal response?
A Web address is called a(n) ________
Fill in the blank(s) with correct word
Which is a unique, logical 32-bit address that identifies a computer?
a. IP address b. Subnet mask c. Default gateway d. DNS Server address
A company would like to configure newsfeeds on the network for employees to be aware of internal company information. Which of the following ports would be used to allow newsfeeds to passthrough?
A. 25 B. 22 C. 119 D. 143