tub } publicvoidmousePressed(MouseEventarg0){ //TODOAuto-generatedmethodstub } publicvoidmouseReleased(MouseEventarg0){ //TODOAuto-generatedmethodstub } publicvoiditemStateChanged(ItemEventarg0){ Stringstr=songlist.getSelectedItem(); playsong.stop(); for(inti=0;i<name.length;i++) if(str==name[i]) { j=i; break; } Yu.run(); } publicvoidrun(){ playsong=song[j];//播放状态为播放时 playsong.play();//播放选定歌曲?playname=name[j];?if(loopbutton==true)?{ playsong.loop();//循环播放选定歌曲 songname.setText("循环播放:"+playname);?}?else songname.setText("正在播放:"+playname); songlist.select(j);//播放列表中选定播放歌曲项目?play.setIcon(newImageIcon("5.png")); } publicAudioCliploadSound(Stringfilename){//返回一个AudioClip对象 URLurl=null; try{ url=newURL("file:"+filename); }catch(MalformedURLExceptione){} returnApplet.newAudioClip(url); }?}5、程序运行结果