Results 1 to 3 of 3
- 10-08-2009, 01:37 AM #1
Member
- Join Date
- Jan 2009
- Posts
- 35
- Rep Power
- 0
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
- 10-08-2009, 05:43 AM #2
Applets tend to have strict security constraints... so i would hazard a guess and say those constraints are probably blocking the configuration getter from grabbing machine settings, but again, just a guess.
My Hobby Project: LegacyClone
- 10-08-2009, 11:48 AM #3
Member
- Join Date
- Jan 2009
- Posts
- 35
- Rep Power
- 0
Thanks Matt.
I converted the program to a Frame rather than an Applet.
I don't get that exception any more, but it still does not work very well. The image does not render as expected. But at least it does something!
I found a simpler program sample in the Java 3D tutorial at java3d.org. This one actually works.
-Scott
Similar Threads
-
GNU-compatible keystore
By OrangeDog in forum Advanced JavaReplies: 0Last Post: 04-30-2009, 02:50 AM -
Java3D
By dawiz001 in forum New To JavaReplies: 1Last Post: 03-08-2009, 02:56 AM -
Java3D
By gowry in forum Advanced JavaReplies: 0Last Post: 04-21-2008, 08:07 AM -
x64 compatible ide
By tuBrains in forum Other IDEsReplies: 0Last Post: 03-12-2008, 12:17 PM -
Using a java compatible dll in applet
By swaroopkb in forum Java AppletsReplies: 0Last Post: 08-01-2007, 01:21 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks