First applet program compiles OK but gets runtime error
Hi Folks,
I just started programming in Java 2 weeks ago. The first few simple programs I wrote worked fine but today I wrote my first program which uses an applet to display a simple text string.
It compiles with no errors (using JDK1.2.2) but when I run it I get the following error "Exception in thread "main" java.lang.NoSuchMethodError: main"
Here is the code. Real simple, I am really stumped. Any ideas out there would be very much appreciated.
import javax.swing.JApplet;
import java.awt.Graphics;
public class WelcomeApplet extends JApplet {
public void paint ( Graphics g )
{
g.drawString ( "Welcome to", 25, 25 );
g.drawString ( "Java Programming!", 25, 40 );
}
}
Thanks Dennis

