Solved

You Have a Class That Extends the JComponent Class

Question 95

Multiple Choice

You have a class that extends the JComponent class.In this class you have created a painted graphical object.Your code will change the data in the graphical object.What additional code is needed to ensure that the graphical object will be updated with the changed data?


A) You must call the component object's paintComponent() method.
B) You must call the component object's repaint() method.
C) You do not have to do anything - the component object will be automatically repainted when its data changes.
D) You must use a Timer object to cause the component object to be updated.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents