java - Audio Applet playing music error -


in java applet music not playing.i error , not understanding why error coming.how can solve this.

i these errors...........

a.getaudioclip(x,"sound.wav");

symbol: method getaudioclip(url,string)

location: variable of type audioclip

1 error

import java.awt.*; import java.applet.*; import java.net.*; /* <applet code="audioapplet.java" height=500 width=400> </applet>  */ public class audioapplet extends applet { audioclip a; public void paint(graphics g) { g.drawstring("play music",20,40); url x=getcodebase(); url y=getdocumentbase(); a.getaudioclip(x,"sound.wav"); g.drawstring(x+"",20,100); g.drawstring(y+"",20,150); a.play(); showstatus("playing.........."); } public void stop() { a.stop(); } } 

replace . =

a.getaudioclip(x,"sound.wav"); ---- > a=getaudioclip(x,"sound.wav");


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -