Problem when running an applet !!!

hello

iam follow the tutorial for applet here http://java.sun.com/docs/books/tutorial/deployment/applet/getStarted.html

when iam try to run the code :

import javax.swing.JApplet;

import java.awt.Graphics;

publicclass HelloWorldextends JApplet{

publicvoid paint(Graphics g){

g.drawRect(0, 0,

getSize().width - 1,

getSize().height - 1);

g.drawString("Hello world!", 5, 15);

}

}

the appletviewer appear but empty and these error listed at bottom

java.lang.ClassNotFoundException: javaapplication22.Main.class

at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:168)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

iam using netbeans 5.5 beta , what's the wrong ?

thanks advance

[1179 byte] By [eaajea] at [2007-10-3 9:50:22]
# 1
How are you running it?The code looks fine.
zadoka at 2007-7-15 5:07:34 > top of Java-index,Desktop,Core GUI APIs...
# 2
right click -> run file
eaajea at 2007-7-15 5:07:34 > top of Java-index,Desktop,Core GUI APIs...
# 3
Does javaapplication22 mean anything to you?Are clicking on the correct file? Are you running it as an Applet?I don't know what you are clicking on. Also I don't use netbeans so you might want to try a netbeans forum.
zadoka at 2007-7-15 5:07:34 > top of Java-index,Desktop,Core GUI APIs...
# 4
ok i'll try to solve it with netbeans forumwhat's your IDE ? thanks
eaajea at 2007-7-15 5:07:34 > top of Java-index,Desktop,Core GUI APIs...
# 5
I typically use Eclispe and sometime Sun Java Studio Creator 2. I have used Netbeans and JBuilder in the past, but I am not famaliar with it enough. Like I said your code looks good, I think it has something to do with how you are launching it.
zadoka at 2007-7-15 5:07:34 > top of Java-index,Desktop,Core GUI APIs...
# 6
Did you use appletviewer to run it ?
ErwinLaya at 2007-7-15 5:07:34 > top of Java-index,Desktop,Core GUI APIs...