Write a program to display a string "Java Applet" on applet window using font "Times New Roman", size as 14 and style as BOLD+ITALIC. The string should be passed as parameter.

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!!!



Copyright © LetML. Blogger Templates Designed by OddThemes