Hi Joao,

might be the woring idea, but in my work several canvases showed up. Have
you added a Layout to your JPanel? I just send you my code, there it worked.
Originally I justed mPanel and added cameraPanel and mainPanel.

Regards,  britta


   //Cameras
        CameraView frontCamera = aqua.getFrontCamera();
        Canvas3D frontCanvas = frontCamera.getCanvas3D();
        frontCanvas.setSize( new Dimension( 600, 400 ) );


        CameraView rightCamera = aqua.getRightCamera();
        CameraView leftCamera = aqua.getLeftCamera();
        CameraView topCamera = aqua.getTopCamera();


        Canvas3D rightCanvas = rightCamera.getCanvas3D();
        Canvas3D leftCanvas = leftCamera.getCanvas3D();
        topCanvas = topCamera.getCanvas3D();



        rightCanvas.setSize( new Dimension( 600, 400 ) );
        topCanvas.setSize(new Dimension (600, 400));
        leftCanvas.setSize(new Dimension( 600, 400));

        cameraPanel.add(rightCanvas);
        cameraPanel.add(topCanvas);
        cameraPanel.add(leftCanvas);

        mainPanel.add( frontCanvas, BorderLayout.CENTER );

     //   mPanel = new JPanel();
      //  mPanel.setLayout( new GridLayout( 1, 1, 2, 2 ) );
      //  mPanel.setLayout(null);
    //    mPanel.add( mainPanel );
     //   mPanel.add( cameraPanel );

        frame.getContentPane().setLayout(new BorderLayout());
        //frame.getContentPane().setSize( 600, 400 );
        frame.getContentPane().add( mainPanel );

----- Original Message -----
From: "Joao Manuel De Oliveira Francisco" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, October 20, 2001 1:22 AM
Subject: [JAVA3D] Using Swing with Java3D


> Hi there!!
> I am having some problems trying to display more than 1 canvas in a Swing
> interface.
> One canvas works fine just by adding it to a JPanel, but when I try to add
> another canvas to the frame it just doesnt show up.
> Even when I create an individual JPanel for each canvas it doesnt seem to
> work.
> Both canvas are displayed correctly one at a time.
> I've tried to find on the Internet a Java3D application using multiple
> canvas with Swing but I havent been succesful yet.
> Thanks,
> Joao Francisco
>
>
> ***********************************************************
> *            JOAO MANUEL DE OLIVEIRA FRANCISCO            *
> *                                                         *
> *                [EMAIL PROTECTED]               *
> *              http://www.rnl.ist.utl.pt/~jmof            *
> *                                                         *
> *Licenciatura Engenharia Informatica e Computadores (LEIC)*
> *   Instituto Superior Tecnico (IST), Lisboa, Portugal.   *
> ***********************************************************
>
>
===========================================================================
> 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".

===========================================================================
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".

Reply via email to