Class cast exception on a JApplet
Hello,
I get the followin error :
java.lang.ClassCastException: com.org.lockey.lottoclient.Lottoclient cannot be cast to java.applet.Applet
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
when running the following code :
public class LottoClient extends javax.swing.JApplet {
String error = "False";
/** Initializes the applet LottoClient */
public void init() {
try {
java.awt.EventQueue.invokeAndWait(new Runnable() {
public void run() {
initComponents();
}
});
} catch (Exception ex) {
ex.printStackTrace();
}
}
I'm not sure why I can run the same code on a different box and it works fine but when I start this same code on a server, I get the error.
Has anyone any thoughts?
Thanks

