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...
Name three skills programmers must have besides the ability to write software
What will be an ideal response?
Compare brute-force attacks and dictionary attacks.
What will be an ideal response?
When can you expect to feel completely confident that you are ready to open the studio and start your career as a professional photographer?
What will be an ideal response?
To control systems such as heating and cooling in your home, ____ is used.?
A. ?near field communication B. ?radio frequency identification C. ?home automation D. ?energy efficient