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

[1047 byte] By [rremedioa] at [2007-11-26 21:10:56]
# 1
the error message refers to a class called com.org.lockey.lottoclient.Lottoclient. You don't seem to have any class by that name. The code you provided is for a class called LottoClient in the default package. LottoClient is not the same as Lottoclient.
BillKriegera at 2007-7-10 2:48:06 > top of Java-index,Desktop,Developing for the Desktop...