68.7k views
2 votes
The method __________ sets the background color to yellow in JFrame frame.

a. setBackground(Color.YELLOW)
b. frame.setBackGround(Color.yellow)
c. frame.setBackground(Color.YELLOW)
d. setBackground(Color.yellow)

User SergVro
by
7.1k points

1 Answer

2 votes

Answer:

c. frame.setBackground(Color.YELLOW)

Step-by-step explanation:

The method that sets the color of the background to yellow in J Frame is the option c as it retrieved the content pane for the frame and applied the set background () technique that inherited from the component for the color change

Therefore the option c is correct

And, the rest of the options are incorrect

User Dmitry Isaev
by
6.5k points