Nazrul wrote:
>
> Hi,
>
> I have a shape 3D in my canvas3D, what I want to do is that if a button
> is pressed in my application I want to replace the shape3D from the
> canvas3D with a new shape.
>
> What is the best way to do this.
>
> I am having lot of problem, I have tried lot of things, also tried to
> detach() a branch group but I keep getting:
> IndexOuyOfBoundsException: Index: -1, Size: 1
> ....
>
> I have set the capability:
>  bGroup.setCapability(BranchGroup.ALLOW_DETACH);
>
IMHO you also need to set the capability bits of you branchgroup's parent node:
parentbGroup.setCapability(parentbgGroup.ALLOW_CHILDREN_READ);
parentbGroup.setCapability((parentbgGroup.ALLOW_CHILDREN_WRITE);
parentbGroup.set  Capability(parentbgGroup.ALLOW_CHILDREN_EXTEND);

Joerg


  http://w5.cs.uni-sb.de/~baus

  Email : [EMAIL PROTECTED]
  Phone : +49-681-302-2016
  Fax   : +49-681-302-4136

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