Hi,

I agree with Peter.

As a general rule, avoid "mixing" GUI components
and graphics by placing them in different JPanels (or subclasses of it).
This minimizes chances of GUI components and/or graphics not displaying
properly.

Regards,

Alejandro

-----Original Message-----
From: Discussion list for Java 3D API
[mailto:JAVA3D-INTEREST@;JAVA.SUN.COM]On Behalf Of Peter Szinek
Sent: Wednesday, October 23, 2002 5:25 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Swing component on Canvas3D


Hello Alex,

Wednesday, October 23, 2002, 09:59:19, you wrote:

A> Hi all,

A> Is it possible to add a swing component, say a JTextArea onto a Canvas3D?
If its possible, how do I go about adding them?

Are you sure you need to add it on the *Canvas3D*?
Wouldn't be sufficient to add it below/over/right/left of the Canvas on the
Panel/Frame/Apple/whatever?

I am not even sure at all you can add swing components on the canvas.

However, if you are talking about adding GUI, try something like this:

...

setLayout( new BorderLayout() );

Canvas3D canvas = new Canvas3D(...);
JPanel guiPanel = new JPanel();

add(guiPanel, BorderLayout.EAST);
add (canvas, BorderLayout.CENTER);

...

Then add everything to guiPanel as usual.

A> Thanks in advance.

A> - Alex -



--
Best regards,
 Peter                            mailto:szyp@;pobox.sk

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