mschumacher74
asked on
Java 3D Graphics: JVM hangs in Canvas3D constructor
Hi,
I am trying to create a simple graphics configuration and pass it to the Canvas#D constructor but the jvm hangs forever in the constructor and never reaches the next statement.
I have tried all the following ways without any luck. I am a beginner in 3D java graphics, any help would be very much appreciated.
-----
Tried the following 3 ways without luck:
/* first try*/
GraphicsConfigTemplate3D template3d = new GraphicsConfigTemplate3D() ;
GraphicsConfiguration[] arrConfig = GraphicsEnvironment.getLoc alGraphics Environmen t().getDef aultScreen Device().g etConfigur ations();
GraphicsConfiguration config = template3d.getBestConfigur ation(arrC onfig);
Canvas3D canvas3D = new Canvas3D(config); //hangs here forever
/* second try */
GraphicsConfiguration config = SimpleUniverse.getPreferre dConfigura tion();
Canvas3D canvas3D = new Canvas3D(config); //hangs here forever
/* Third try */
GraphicsConfigTemplate3D template3d = new GraphicsConfigTemplate3D() ;
GraphicsConfiguration config = GraphicsEnvironment.getLoc alGraphics Environmen t().getDef aultScreen Device().g etBestConf iguration( template3d );
Canvas3D canvas3D = new Canvas3D(config); //hangs here forever
/* Fourth try */
Canvas3D canvas3D = new Canvas3D(null);// this doesn't work since I am using a newer version that doesn't allow passing null for GraphicsConfiguration. Hence I get an error message.
--------------
I am trying to create a simple graphics configuration and pass it to the Canvas#D constructor but the jvm hangs forever in the constructor and never reaches the next statement.
I have tried all the following ways without any luck. I am a beginner in 3D java graphics, any help would be very much appreciated.
-----
Tried the following 3 ways without luck:
/* first try*/
GraphicsConfigTemplate3D template3d = new GraphicsConfigTemplate3D()
GraphicsConfiguration[] arrConfig = GraphicsEnvironment.getLoc
GraphicsConfiguration config = template3d.getBestConfigur
Canvas3D canvas3D = new Canvas3D(config); //hangs here forever
/* second try */
GraphicsConfiguration config = SimpleUniverse.getPreferre
Canvas3D canvas3D = new Canvas3D(config); //hangs here forever
/* Third try */
GraphicsConfigTemplate3D template3d = new GraphicsConfigTemplate3D()
GraphicsConfiguration config = GraphicsEnvironment.getLoc
Canvas3D canvas3D = new Canvas3D(config); //hangs here forever
/* Fourth try */
Canvas3D canvas3D = new Canvas3D(null);// this doesn't work since I am using a newer version that doesn't allow passing null for GraphicsConfiguration. Hence I get an error message.
--------------
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.