Which of the following methods set the frame surface color to pink?

Options
- setBackground(Color.pink);
- setColor(PINK);
- Background(pink);
- None of the above


CORRECT ANSWER : setBackground(Color.pink);

Discussion Board
Java

Good

Srikanth 05-12-2016 01:57 PM

setBackground

setBackground method is used to set the frame surface color to pink.

setBackground(Color.pink);

The Applet class provides the init, start, stop, destroy, and paint methods you saw in the example applet. The SimpleApplet class overrides these methods to do what the SimpleApplet class needs them to do. The Applet class provides no functionality for these methods.

Applet class does provide functionality for the setBackground method,which is called in the init method. The call to setBackground is an example of calling a method inherited from a parent class in contrast to overriding a method inherited from a parent class.

Rohit Sharma 09-30-2014 04:48 PM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement