[求助]错在那儿呢,谢了
我下面的程序是想画个星星,并且当用户shu biao移入时播放一首MP3,怎么编译不能通过呢?那儿出错了?
import java.applet.applet;
import java.awt.*;
import java.applet.AudioClip;
public class Star extends applet
{
int scount;
public void init
{
newAudioClip sb=new newAudioClip(new url("http://show.music.sohu.com/zt/music/cs1.mp3 "))
scount=Integer.parseInt(getParameter("xinsu"));
}
public void paint(Graphics g)
{
g.setColor(Color.pink);
for(int i=0;i<scount;i++)
{
int x=(int)(getSize().width*Math.random());
int y=(int)(getSize().height*Math.random());
int xz[]={x,x+2,x+7,x+2,x,x-2,x-7,x-2,x};
int yz[]={y,y+7,y+7,y+9,y+14,y+9,y+7,y+7,y};
Polygon suzu=new Polygon(xz,yz,9);
g.fillPolygon(suzu);
}
}
public bollean mouseEnter(Event e,int x,int y)
{
sb.play();
return true;
}
}
----------------解决方案--------------------------------------------------------