View Single Post
  #3 (permalink)  
Old 07-10-2007, 09:29 AM
prince24 prince24 is offline
Member
 
Join Date: Jul 2007
Posts: 9
prince24 is on a distinguished road
WHEN I TRY TO RUN THIS SIMPLE PROGRAM :

import java.awt.*;
import java.applet.*;

<applet code="hourglass" width=230 height=210>
</applet>

public class hourglass extends Applet {

public void paint(Graphics g) {
int xpoints[]={30,200,30,200,30};
int ypoints[]={30,30,200,200,30};
int num=5;
g.drawPolygon(xpoints,ypoints,num);
}
}


AS SOON AS I GIVE THE COMMAND javac hourglass.java it says

hourglass.java:4: 'class' or 'interface' expected
<applet code="hourglass" width=230 height=210>
^
1 error



wat t do
Reply With Quote