Dear experts,
I may be trying something too ambitious for the effort, but I'd like
to put j3D Canvases into a JSplitPane--but of course, you cannot see the
split pane divider or scrollbar (for starters). The J3D FAQ suggests a
(possible) work around, but it is a bit "dense." Could someone
unpackage this a bit? Thanks.
From the FAQ (...run Java 3D in Swing components?):
"A partial workaround that seems to work is to fetch the root pane and
render directly to that at a given offset. That is, every lightweight
component requires that somewhere down the list of components there
exists a native window to draw into. In Swing these are JFrame, JDialog
etc. You may trace down the object parent list until you hit the frame.
Each time you do this you must keep track of the offset from the parent
component to work out where you are in real coordinates relative to the
parent window. Once you have the parent Frame you can then access the
JRootPane and use that as the component that the Canvas3D will render
to. Note that every time the window is resized you will have to go
through this rediscovery process of your location. "
--
Christopher Currie | EMAIL: [EMAIL PROTECTED]
http://kahuna.psych.uiuc.edu/~ccurrie/homePage.html
|
Laboratory for Computational Astrophysics (LCA)
at the NCSA and Beckman Institute at the University of Illinois
INTERNET INTERFACE TO NUMERICALY SIMULATED GALAXY CLUSTERS:
http://sca.ncsa.uiuc.edu/
and
Imaging Systems Laboratory INTERACTIVE 3-D FOREST ENVIRONMENT:
http://imlab9.landarch.uiuc.edu/smartforest/
----
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/