Results 1 to 3 of 3
  1. #1
    ScottVal is offline Member
    Join Date
    Jan 2009
    Posts
    35
    Rep Power
    0

    Default 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

  2. #2
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    Location
    San Jose, CA, USA
    Posts
    320
    Rep Power
    6

    Default

    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

  3. #3
    ScottVal is offline Member
    Join Date
    Jan 2009
    Posts
    35
    Rep Power
    0

    Default

    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

  1. GNU-compatible keystore
    By OrangeDog in forum Advanced Java
    Replies: 0
    Last Post: 04-30-2009, 03:50 AM
  2. Java3D
    By dawiz001 in forum New To Java
    Replies: 1
    Last Post: 03-08-2009, 03:56 AM
  3. Java3D
    By gowry in forum Advanced Java
    Replies: 0
    Last Post: 04-21-2008, 09:07 AM
  4. x64 compatible ide
    By tuBrains in forum Other IDEs
    Replies: 0
    Last Post: 03-12-2008, 01:17 PM
  5. Using a java compatible dll in applet
    By swaroopkb in forum Java Applets
    Replies: 0
    Last Post: 08-01-2007, 02:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •