Hallo people,
I've got a problem with task 1 from the java3d sun tutorial. A few days
ago I started to work with java3d. My first job should be the task I
mentioned before. I downloaded the actual java3d sdk and installed it. I
attached the jar's to the j2sdk1.4.2_06. I finished my job and compiled
it. But I can't see anything into my applet. I don't get any mistake
into my console. The applet opens but nothing's inside. Here's the code
I tried to compile:

[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.geometry.ColorCube;
import com.sun.j3d.utils.universe.SimpleUniverse;

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 simpleU = new SimpleUniverse(canvas3D);
       simpleU.getViewingPlatform().setNominalViewingTransform();
       simpleU.addBranchGraph(scene);
   }

   public BranchGroup createSceneGraph() {
       BranchGroup objRoot = new BranchGroup();
       objRoot.addChild(new ColorCube(0.4));
       return objRoot;
   }

   public static void main(String[] args){
       Frame frame = new MainFrame(new HelloJava3Da(), 256, 256);
   }
}

[/code]

Does anybody know the problem or see my mistake?

thank you,
Ingo

===========================================================================
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".

Reply via email to