HelloUniverse Java3D Applet: GraphicsConfiguration not Compatible
Hello-
In the Java3D API Spec manual, there is a sample program on page 10 called "HelloUniverse." I have implemented this as a NetBeans project, as a sample of a Java3D project.
The program has this line of code:
... new Canvas3D(graphicsConfig);
which obviously means you need to put some code in there to get the graphics config. So I got the graphics config with a call to getGraphicsConfiguration().
I built the project, and created an html page with the imbedded applet.
When I ran the program, I got the exception:
"Exception: java.lang.IllegalArgumentException: Canvas3D: GraphicsConfiguration is not compatible with Canvas3D"
So I looked at the docs on Canvas3D and saw that you're supposed to get the graphics config from "GraphicsConfigTemplate3D or the getPreferredConfiguration() method of the SimpleUniverse utility."
The GraphicsConfigTemplate3D thing looked complicated, but in SimpleUniverse there is a static method, getPreferredConfiguration(). So I used that.
... new Canvas3D(SimpleUniverse.getPreferredConfiguration( ));
I'm still getting the above exception, so I'm sort of stuck.
Can anyone help me?
-Scott