Write an applet that displays a simple message.
Program Code:
import java.applet.Applet;
import java.awt.Graphics;
public class Hello extends Applet
{
public void paint(Graphics g)
{
g.drawString("Hello world",50,30);
}
}
Program Code:
import java.applet.Applet;
import java.awt.Graphics;
public class Hello extends Applet
{
public void paint(Graphics g)
{
g.drawString("Hello world",50,30);
}
}
output
ReplyDelete