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);
public void init() {
public void paint(Graphics g) {
g.drawString("This is the Applet", 50, 75);


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

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.