What is the setBackground() method?

February 9th, 2008 by uCertify Leave a reply »

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:

void setBackground(Color newcolor)

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
Click here to get free scja SCJA exam practice questions. Pass SUN CX310-019 - SCJA
  • Share/Bookmark
Advertisement

Leave a Reply

uCertify.com | Our Company | Articles | Contact Us | News and Press Release | uCertify India | Entries (RSS)
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD    Cisco Certification: CCNA, CCENT    A+, Network+, Security+ Project+
Oracle Certification: OCP 11g, OCP 10g, OCA 11g, OCA 10g    CIW foundation    EC-212-32,    CISSP    Photoshop ACE CS4    Adobe Flash ACE, PMP, CAPM
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.