Write a program using Applet to display a message in the Applet.
Program Code:
import java.applet.*;
import java.awt.Graphics;
/* <applet code="Appletdemo.class" width=300 height=300> </applet> */
public class Appletdemo extends Applet
{
public void paint(Graphics g)
{
String msg="HELLO!, Welcome to my applet ";
g.drawString(msg,80,150);
}
}
Keep it up.
ReplyDelete