Sunday 15 April 2012

Java audio playing error -


I'm a Java novice.

I was reading a tutorial book, and tried an example of trying almost all the code, and they all worked perfectly but when I tried to play this audio tutorial, even though I I understand more than that, but I can not let it play This tells me the error,

Exceptions to the thread "main" java.lang.Error: Unresolved compilation problem: MouseClicker.main (MouseClicker.java:9)

Here is the code

  import javax.swing. *; Import java.awt.event. *; Import java.awt. *; Import java.applet. *; Import java.net.URL; Public class mouseClicker Jframe extension (audioclick click; public static zero main (string [] args) {new mouseclicker}}} public mouseclick () {this.setSize (400,400); This.setTitle ("mouse clicker"); .addMouseListener (new clicker ()); URL urlClick = mouseclickerclash.getRSource ("hello.WW"); click = applet.NAU audio clip (urlClick); this.setVisible (true);} Private class clicker mouse adapter public zero Mouseclatic (click.play ()) Reads;}}   

enter image details here

  Public class mouseclicker extends Jframe {  < P> This is a  JFrame , not a  Jframe . (Capital F)  

Remember, Java is case sensitive!

No comments:

Post a Comment