Karthik,
This simply means that you've added this object to another parent
already.
For example, if you have:
TransformGroup tgA = new TransformGroup();
BranchGroup bgA = new BranchGroup();
BranchGroup bgB = new BranchGroup();
bgA.addChild( tgA );
bgB.addChild( tgA);
The last line will throw the exception you've indicated.
This is indicating that you've attached something to two parents.
Example of BAD code snippet:
Shape3D s3d = new Shape3D();
TransformGroup tgA = new TransformGroup();
TransformGroup tgB = new TransformGroup();
tgA.addChild(s3d);
tgB.addChild(s3d); // <- BAD! s3d already has a parent!
You can NOT clone Shape3Ds like this. What you want for something like
this is to put the Shape3D in a SharedGroup and then make links.
"K.R.Karthikeyan" schrieb:
> Hi All, I have a createSceneGraph() method . In that method i
> build the whole structure. Inside that method i add a behavior object.
> This behavior is my own class which is a sub class of the Behaviour
> class. On click of some button I call this createSceneGraph() method
> again. So wat happens is that the behavior object is again created &
> added. Instaed of creating it again & again...I thought of creating it
> only once say in the Initailze() & just add the object in the
> createSceneGraph(). But i'm getting a MultipleParentException. Branch
> Group |Transform Group ( to this TG i add few Shape3D objects &
> my behavior) Inside the createSceneGraph()...I recreate all objects.
> But i don't want to create the Behavior object again. How can i aviod
> this ??? Thanks in Advance,Karthik
===========================================================================
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".