So I'm making a smiley face. It' compiles just fine, and at the run time it says "process completed" but the applet doesn't pop up. I have absolutely no idea what's going on!!
Here is the error message:
java.lang.NoSuchMethodError: main
Exception in thread "main"
Process completed.
Here is the beginning part of my code:
/**
/**
* @(#)snow2.java
*
*
* @author
* @version 1.00 2010/9/25
*/
import java.awt.*;
public class snow2 extends java.applet.Applet {
/** Initialization method that will be called after the applet is loaded
* into the browser.
*/
public void init() {
// TODO start asynchronous download of heavy resources
}
public void paint (Graphics page)
{
final int MID = 130;
final int TOP = 50;
setBackground (Color.cyan);
page.setColor (Color.blue);
page.fillRect (0, 175, 300, 50); // ground
page.setColor (Color.yellow);
page.fillOval (260, 40,80, 80); // sun
page.setColor (Color.white);
page.fillOval (MID-20,TOP, 40, 40); // head
page.fillOval (MID-35,TOP+35, 70, 50); // upper torso
page.fillOval (MID-50,TOP+80, 100, 60); // lower torso
page.setColor (Color.red);
page.fillOval (MID-3,TOP+50, 6, 6); // button
page.fillOval (MID-3,TOP+60, 6, 6); // button
page.setColor (Color.black);
page.fillOval (MID-10,TOP+10, 5, 5); // left eye
Please if you can help me in anyway, I'd greatly appreciate it!