A. You may create a Graphics object using new Graphics(). B. Whenever a GUI component is displayed, its Graphics object is automatically created. C. The paintComponent method is automatically invoked by the JVM. You should never invoke it directly. D. Invoking repaint() causes paintComponent to be invoked by the JVM.

Which of the following statements are true?


A. You may create a Graphics object using new Graphics().
B. Whenever a GUI component is displayed, its Graphics object is automatically created.
C. The paintComponent method is automatically invoked by the JVM. You should never invoke it directly.
D. Invoking repaint() causes paintComponent to be invoked by the JVM.

The correct answer is BCD


Java

Learn More Multiple Choice Question :