Hi, I'm embedding a Canvas3D into a swing JPanel. It works well except my 3D scene doesn't display until I manually click a few buttons in my app. Does anyone know how I can get it to automatically display? Here's my Canvas3D code: Canvas3D canvas3D = new Canvas3D( null ); SimpleUniverse simpleU = new SimpleUniverse(canvas3D); BranchGroup scene = createSceneGraph(); simpleU.getViewingPlatform().setNominalViewingTransform(); // This will move the ViewPlatform back a bit simpleU.addBranchGraph(scene); this.setLayout( new BorderLayout() ); this.setOpaque( false ); //this.setBackground(java.awt.Color.WHITE); //canvas3D.setBackground(java.awt.Color.WHITE); this.add("Center", canvas3D); // <-- HERE IT IS - tada! j3d in swing As I mentioned, I embedding the Canvas3D into a Jpanel using the following code: JPanel OuterPanel; OuterPanel.add("Center", new ThreeDeeScene()); Any help would be appreciated. ./dylan ===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
|
- Re: [JAVA3D] Getting my Canvas3D to display without requ... Eli Dylan Lorimer