Programs:
Develop an applet that displays a simple message in the center of the screen.
Aim: Introduce java Applet, awt, and swings.
import java.applet.Applet;
import java.awt.Graphics;
/*
<applet code="AppletP.class" width="300" height="300">
</applet>
*/
public class AppletP extends Applet
{
public void paint(Graphics g)
{
g.drawString("Welcome to applet",100,150);
}
}
Output:-