import java.applet.*;
import java.awt.*;
public class Polygon extends Applet
{
int x[]={10,50,100,200,70,10};
int y[]={50,10,30,50,80,50};
Image i; // Abstract class
AudioClip ac;
public void init()
{
i=getImage(getDocumentBase(),"image1.gif");
ac=getAudioClip(getDocumentBase(),"eyeBeam.wav");
ac.play();
}
public void paint(Graphics g)
{
g.drawPolygon(x,y,5);
g.drawString("*",100,100);
g.drawImage(i,200,200,this);
}
}
import java.awt.*;
public class Polygon extends Applet
{
int x[]={10,50,100,200,70,10};
int y[]={50,10,30,50,80,50};
Image i; // Abstract class
AudioClip ac;
public void init()
{
i=getImage(getDocumentBase(),"image1.gif");
ac=getAudioClip(getDocumentBase(),"eyeBeam.wav");
ac.play();
}
public void paint(Graphics g)
{
g.drawPolygon(x,y,5);
g.drawString("*",100,100);
g.drawImage(i,200,200,this);
}
}