I had a similar problem, in my JTabbedPane app, where multiple JFrames containing Simple Universes ran fine. As soon as I tried to change to VirtualUniverse and sensing the hardware configuration on one panel, everything froze.
 
 
(------excerpt from the tutorial) ---------
GraphicsConfigTemplate3D tmpl = new GraphicsConfigTemplate3D();
GraphicsEnvironment env =
  GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice device = env.getDefaultScreenDevice();
GraphicsConfiguration config = device.getBestConfiguration(tmpl);
canvas = new Canvas3D(config);
Then to finish, you create the canvas and it to the parent frame.

canvas = new Canvas3D(config);

add(canvas, BorderLayout.CENTER);
Of course, a simpler way of doing this is to create a canvas with a null passed in, this achieves the same effect.
 
(------- end of excerpt from the tutorial) ---------
 
 
... a canvas with null passed in does background config somehow? I used a null config and everything was fine again. Of course that still left the problem of why supplying a config to Canvas3D always created problems, but I didn't have time to chase it down yet.
Peter
 

Reply via email to