Problems with applet - no text in the window

Hi!

I'm trying to learn some java, and I've just done my first applet. The code looks like this:

__

import java.awt.*;

import java.applet.*;

public class MittNamnApplet extends Applet {

Font f;

public void init() {

f = new Font("SansSerif", Font.BOLD, 24);

setBackground(Color.pink);

}

public void pain (Graphics g) {

g.setFont(f);

//g.setColor(Color.blue);

// g.drawString("Habibi", 45,100);

}

}

__

And then I made an html code that looks like this:

<html>

<applet code="MittNamnApplet.class" height=200 width=320>

</applet>

</html>

_

When I run it with appletviewer in Command prompt there is only a pink squre coming up, where is the text? Why? Can someone please help a dummie?

Thanks ;-)

[878 byte] By [habibia] at [2007-10-1 23:33:54]
# 1
The method name should be "paint", not "pain".And you have commented out the g.drawstring statement, so it doesn't draw your name.
ChuckBinga at 2007-7-15 15:22:46 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...