SimpleTableDemo needs to extend Applet to be run as an Applet.
The class declaration line should be changed from
public class SimpleTableDemo extends JFrame {
to
public class SimpleTableDemo extends JApplet {
or
public class SimpleTableDemo extends Applet {
You've also got to make some changes to the main method and override some
methods like the init() method.
I recommend reading through the tutorial on how to make applets on
java.sun.com.
Jim
----- Original Message -----
From: "Tonz ." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 20, 2001 2:30 PM
Subject: [JAVA3D] Swing
> Hi there
>
> I've got a source code file called SimpleTableDemo.java from the
> SDK_1.3-Turorials
> and I compiled it without errors
> I can just run it as an application ( java SimpleTableDemo )
> but when I try to run it using the AppletViewer ( AppletViewer
> SimpleTableDemo.html )
> i've got this error:
>
> java.lang.ClassCastException: SimpleTableDemo
>
> at sun.applet.AppletPanel.createApplet(AppletPanel.java:579)
>
> at sun.applet.AppletPanel.runLoader(AppletPanel.java:515)
>
> at sun.applet.AppletPanel.run(AppletPanel.java:293)
>
> at java.lang.Thread.run(Thread.java:484)
>
>
> I created also HTML file that can run the swing component
> and I have the plug-in installed on my PC
> and I can run the Java3D demos
>
> but when I try to run the html file (swing) I've got this error on the
java
> console:
>
> java.lang.ClassCastException: SimpleTableDemo
>
> 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)
>
>
>
> can anyone tell me what does this error means
> and what can I do to be able to run it using appletviewer and also to run
> the html file
>
>
> thanxxx :)))
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff JAVA3D-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".