Which of the following is one way to get a reference to the Graphics object for an AWT component or a class that extends JApplet or JFrame?
A) Override the component's paint method.
B) Create a static instance of the Graphics object.
C) Pass an instance of the Graphics object as an argument to the component's constructor.
D) Create an instance of any class that extends the Graphics2D class.
Correct Answer:
Verified
Q1: Web pages are normally written in
A) Hypertext
Q2: To make a Web page, you create
Q3: To run an applet, you create an
Q4: The HTML tag that is used to
Q5: The names of the AWT classes are
Q7: Applets run in a restricted environment to
A)
Q8: Each component has an internal object that
Q9: Which of the following statements is correct
Q10: These are Java programs that are usually
Q11: For all Swing components except JApplet and
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents