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.

One thought on “A simple applet to display a message

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">