Solved

In the Code Below, Write a Statement That Sets the Graphic

Question 22

Multiple Choice

In the code below, write a statement that sets the graphic to green. public class ItalianFlagComponent extends JComponent
{
Public void paintComponent(GraphicsG) {
Graphics2D g2 = (Graphics2D) g;
Rectangle.Double leftRectangle = new Rectangle.Double(100, 100, 30, 60) ;
) . .
____
) . .
}
}


A) g2.setColor(GREEN) ;
B) g2.SetColor(0, 255, 0) ;
C) g2.setColor(Color.GREEN) ;
D) g2.setColor("GREEN") ;

Correct Answer:

verifed

Verified

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

Related Questions