A simple applet to display a message

This is a simple applet to set the background color to “CYAN” and display a message.

In an applet init() is used to initialize the applet and paint() is used to display a message.

In the above code, setBackground() method is used to set the background color. The color to which it has to be set is passed as arguments.
The drawString() method is used to display messages.

The following two tabs change content below.
  • kshitij

    thank you