Problem with chapter 1 from Sun's Java3D

Hi,
I’ve got a problem viewing my applet. I can’t find any mistake into the code.


import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.GraphicsConfiguration;
import javax.media.j3d.BranchGroup;
import javax.media.j3d.Canvas3D;
import com.sun.j3d.utils.applet.MainFrame;
import com.sun.j3d.utils.universe.*;
import com.sun.j3d.utils.geometry.ColorCube;
import com.sun.j3d.utils.universe.SimpleUniverse;
import javax.media.j3d.*;
import javax.vecmath.*;

public class HelloJava3Da extends Applet {
      public HelloJava3Da() {
            setLayout(new BorderLayout());
            GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
            Canvas3D canvas3D = new Canvas3D(config);
            add("Center", canvas3D);
            
            BranchGroup scene = createSceneGraph();
            scene.compile();
            
            //simpleUniverse is a convenience utility class
            SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
            
            //this moves the viewplatform back a bit so the
            //objects in the scene can be viewed
            simpleU.getViewingPlatform().setNominalViewingTransform();
            simpleU.addBranchGraph(scene);
      }
            
      public BranchGroup createSceneGraph() {
            //create the root of the branch graph
            BranchGroup objRoot = new BranchGroup();
            
            //Create a simple shape leaf node, add it to the scene graph.
            //ColorCube is a convenience Utility Class.
            objRoot.addChild(new ColorCube(0.4));
            
            return objRoot;
      }
      
      public static void main(String[] args){
            Frame frame = new MainFrame(new HelloJava3Da(), 256, 256);
      }
}

But I am a newbie. I think there’s a browser problem. I am working with eclipse 3.1. The applet viever shows the applet [example Java3Da] But I don’t see a cube. And I didn’t get an error message into my eclipse console. If I try to open another applet with firefox 1.0 I get the following message:


java.lang.VerifyError: (class: HexColor, method: keyDown signature: (Ljava/awt/Event;I)Z) Unsorted lookup switch

      at java.lang.Class.getDeclaredConstructors0(Native Method)

      at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)

      at java.lang.Class.getConstructor0(Unknown Source)

      at java.lang.Class.newInstance0(Unknown Source)

      at java.lang.Class.newInstance(Unknown Source)

      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)

Does anybody know the problem?

thank you,
bolshi