Check the number of children of your group. Make sure that the group u
r removing the children from DOES have at least one child (use
numChildren func). If u use J3D 1.2 version, try this on the previous
version of the J3D. Make sure that u also meet the following
conditions (though other exceptions should be thrown in this case, but
this easily could be a bug):
CapabilityNotSetException - if the appropriate capability is not set
and this group node is part of live or compiled scene graph
RestrictedAccessException - if this group node is part of
live or compiled scene graph and the child node being
removed is not a BranchGroup node
ArrayIndexOutOfBoundsException - if 'index' was invalid.
N> IndexOuyOfBoundsException: Index: -1, Size: 1
Try to removeChild(0) directly and see what happens. I guess it should
work out. In this case u'd need to check up on your algorithm where u
define the index of the Child to be removed.
Possibly that helped,
vladimir
-=V=-
>-------<=============>-------<
Join in Java community now!
http://JavaCafe.VirtualAve.net/
>-------<=============>-------<
In your previous letter u wrote:
--------------------------------
N> Hi,
N> I have a shape 3D in my canvas3D, what I want to do is that if a button
N> is pressed in my application I want to replace the shape3D from the
N> canvas3D with a new shape.
N> What is the best way to do this.
N> I am having lot of problem, I have tried lot of things, also tried to
N> detach() a branch group but I keep getting:
N> IndexOuyOfBoundsException: Index: -1, Size: 1
N> ....
N> I have set the capability:
N> bGroup.setCapability(BranchGroup.ALLOW_DETACH);
N> please help if you can
N> Thanks
N> Nazrul
N> ===========================================================================
N> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
N> of the message "signoff JAVA3D-INTEREST". For general help, send email to
N> [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".