Multiple Choice
When added to the code below, which statement will set the color of the next item drawn to green?
Public class ItalianFlagComponent extends JComponent
{
Public void paintComponent(Graphics g) {
g.drawRect(100, 100, 30, 60) ;
) . .
____________________________
) . .
}
}
A) g.setColor(GREEN) ;
B) g.setColor(0, 255, 0) ;
C) g.setColor(Color.GREEN) ;
D) g.setColor("GREEN") ;
Correct Answer:

Verified
Correct Answer:
Verified
Q3: What is the nickname for the graphical
Q3: Use the _ method to specify the
Q11: When drawing complex shapes, provide a(n) _
Q31: Which statement should be added to this
Q31: A(n) _ has an instance method addActionListener()
Q32: Which of the following statements is correct?<br>A)
Q34: To draw an ellipse, you must include
Q35: Complete the following statement to construct a
Q39: To build a user interface that contains
Q41: Consider the following code snippet:<br>JPanel panel =