How i can execute a applet code in web browser.I use eclipse to compile code.
My code is...

public class MyApplet extends Applet{
Font f=new Font("TimesRoman", Font.BOLD, 24);
@Override
public void init() {
super.init();
setFont(f);
}
@Override
public void paint(Graphics g) {
super.paint(g);
g.drawString("This is the Applet", 50, 75);
}

}

and my html code is ::
<html>
<title>
MyApplet</title>
<body>
<h3>My Applet<h3>
<Applet code=MyApplet.class Height=150 width=300>
</Applet>
</body>
</html>

but when i run the code in web browser i saw a problem.How i can solve this problem.If anyone help me or describe details how to run applet code in web browser.