I have tried to replace MainFrame with JFrame and it works. Say in the
HelloUniverse example that comes with Java3D, try replace the line:
> new MainFrame(new HelloUniverse(), 256, 256);
with:
> JFrame f = new JFrame("HelloUniverse in JFrame");
> f.setSize(256,256);
> f.getContentPane().add(new HelloUniverse());
> f.setVisible(true);
That will bring up a JFrame with HelloUniverse in it. However, it
expects to see some odd results when mix Java3D(use heavyweight
components) with some Swing component(lightweight).
wchen
>From [EMAIL PROTECTED] Wed Jan 13 02:33:45 1999
>Received: from Eng.Sun.COM (engmail2 [129.146.1.25]) by mercury.Sun.COM
(SMI-8.6/mail.byaddr) with SMTP id CAA19864; Wed, 13 Jan 1999 02:20:42
-0800
>Received: from capra.eng.sun.com (capra.Eng.Sun.COM [129.144.251.81])
> by Eng.Sun.COM (SMI-8.6/SMI-5.3) with SMTP id CAA04478;
> Wed, 13 Jan 1999 02:20:37 -0800
>Received: by capra.eng.sun.com (SMI-8.6/SMI-SVR4)
> id CAA04213; Wed, 13 Jan 1999 02:18:13 -0800
>Message-ID: <[EMAIL PROTECTED]>
>Date: Wed, 13 Jan 1999 11:15:30 +0100
>From: Peter Rohleder <[EMAIL PROTECTED]>
>Organization: GMD - National Research Center for Computer Science
>X-Mailer: Mozilla 4.5 [en] (WinNT; I)
>X-Accept-Language: de-DE,en,fr
>MIME-Version: 1.0
>To: Java3D-MailingList List <[EMAIL PROTECTED]>
>Subject: [java3d] Java3D examples with Swing ?
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>Sender: [EMAIL PROTECTED]
>Precedence: bulk
>
>Does anybody have a Java3D-example constructed with using Swing. I
>currently have the problem to embedd a MainFrame-Window(all examples
>depend on a MainFrame-Window) inherited from Frame into Swing. As far
as
>I have understood what I've read, Swing depends on using JFrames.
>
>Peter Rohledere
>--
> Peter Rohleder, e-mail: [EMAIL PROTECTED]
> GMD - Forschungszentrum Informationstechnik GmbH
> Schloss Birlinghoven, D-53754 Sankt Augustin, Germany
> Tel.: +49-2241-142208; FAX: +49-2241-142065
>=====================================================================
>To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
>Java 3D Home Page: http://java.sun.com/products/java-media/3D/
>
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/