getting error in this code

From: syntax (sanko50_at_yahoo.com.hk)
Date: 02/28/04


Date: 28 Feb 2004 11:34:12 -0800

hi, i am learning AWT . i wrote a small code to test but its giving error.

code
------

 import java.awt.*;
import java.applet.*;
public class test1 extends Applet

 {
   public void init ()
          
          {
             setLayout (new FlowLayout ());
             add (new Button ("One"));
             add (new Button ("Two"));
             add (new Button ("Three"));
             add (new Button ("Four"));
             add (new Button ("Five"));
             add (new Button ("Six"));
             
           }
              
 }

i am getting " java.lang.NoSuchMethodError: main
Exception in thread "main" " message at the time of execution.

can you tell me , how can i run this code? what changes i have to do?


Quantcast