Saturday, 14 September 2013

java.lang.ClassCastException: Compare cannot be cast to java.applet.Applet

java.lang.ClassCastException: Compare cannot be cast to java.applet.Applet

I was trying an example taken from here:
http://12inchpianist.com/2010/07/30/line-smoothing-in-java/ because is
helpful for a project that I am doing for a course at Universiry.
The problem is that when I try to run it (I did not change anything in the
code) it returns me this error message:
java.lang.ClassCastException: Compare cannot be cast to java.applet.Applet
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
So my questions are:
if you guys try to run the same code, do you get the same message?
how can I solve this error in order to be able to run the program?
Thanks a lot in advance!

No comments:

Post a Comment