import java.awt.*;
import java.applet.*;
/*
<applet code="Exp10_1" width = "200" height = "200">
<param name="str" value="Java Applet">
</applet>
*/
public class Exp10_1 extends Applet
{
String msg;
public void init()
{
msg = this.getParameter("str");
setFont(new Font("Times New Roman", Font.BOLD + Font.ITALIC, 14));
}
public void paint(Graphics g)
{
g.drawString(msg, 50, 100);
}
}
/* OUTPUT!!!
import java.applet.*;
/*
<applet code="Exp10_1" width = "200" height = "200">
<param name="str" value="Java Applet">
</applet>
*/
public class Exp10_1 extends Applet
{
String msg;
public void init()
{
msg = this.getParameter("str");
setFont(new Font("Times New Roman", Font.BOLD + Font.ITALIC, 14));
}
public void paint(Graphics g)
{
g.drawString(msg, 50, 100);
}
}
/* OUTPUT!!!