What is the setBackground() method?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is the setBackground() method?
Rating:
The setBackground() method is defined by the Component class. It is used to set the background of an applet's window to a specified color. The syntax of this method declaration is as follows:
Here, new color specifies the color. The Color class defines the constants, which can be used to set the color. Some of them are listed below:
- Color.black
- Color.pink
- Color.green
- Color.yellow
Rating:
Was this information helpful?
Other articles
- What are final variables?
- What is the Collection interface?
- What is JavaScript?
- What are the types of Web services?
- What is an entity bean?