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...
The ________ can be launched by adding a command to the Quick Access Toolbar, by adding a command to the Ribbon, or by running it automatically in the Immediate window using a VBA command
Fill in the blank(s) with correct word
Which of the following are types of multiplexing devices?
A) Concentrators B) Front-end processors C) Multiplexers D) All of the above E) None of the above