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
8.8k 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
7.9k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories