Encapsulate the function removing the 2TG within:
try
{
   ... your code ...
}
catch (Throwable t)
{
   t.printStackTrace();
}
 
You will see at the console the exception raised, so you'll know what's exactly the problem, i.e. a message like TransformGroups cannot be removed from live objects. Furthermore, your program won't stop responding.
 
Cheers,
 
Florin
 
-----Original Message-----
From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]On Behalf Of Alp Yilancioglu
Sent: Freitag, 4. Juni 2004 02:08
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Robot Arm simulation

Hi,

 

  Thank you for helping me in this..

 

  But I still got a problem

 

 

In the code

 

Lets say I have 1TG and  2TG named  TransformGroups

          that have setCapability-Allow-transformGroup-read/write properties

 

and  1TG->has the shape added sphere

        2TG-> has cylınder

and 1TG.addChild(2TG);

is working well..

 

in the code after adding 2TG to 1TG . I can remove them too wıth removeChıld

 

       1TG->has sphere

        2TG-> has cylınder

        1TG.addChild(2TG);

        1TG.removeChıld(2TG);

 

thıs works well too..

 

but durıng Runtime.. when ı done thıs -1TG.removeChıld(2TG);-

      wıth a functıon whıch ıs performed by pressıng a button from a panel

                     the program stops .. no renderıng or may be ıt crashes ???

 

 

 

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