Hi, Florin,
Thanks for your words, it is really helpful. But how
to make the group subclasses not live or compiled?
regards.
tony


--- Florin Herinean <[EMAIL PROTECTED]> wrote:
> You can use it on any group sublclass as long as
> that group is not live or
> compiled. If is live or compiled, only branch groups
> may be added /
> detached.
>
> Cheers,
>
> Florin
>
>
> Dear friends,
>
> I tried to remove all children by pressing a button,
> so this is the
> codes changed from
> demo/AWT_interaction/AWTInteractionBehavior.java :
>
> [/CODES]
>     private BranchGroup    BG;
> ...
>     public void processStimulus(Enumeration
> criteria)
> {
>         angle += Math.toRadians(10.0);
>         trans.rotY(angle);
>         transformGroup.setTransform(trans);
>         wakeupOn(criterion);
>         BG.removeAllChildren();
>     }
> ...
> [/CODES]
>
> It can be compiled, but when I run it, there is one
> error:
>
> Exception occurred during Behavior execution:
> javax.media.j3d.RestrictedAccessException: Group:
> only
> a BranchGroup
> node may be
>  removed.
>
> removeAllChildren() is a method can be used by all
> subclasses of
> Group, so I really wonder why here it can not work.
> Would you please
> let me know why?
>
> Thanks in advance.
> tony
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online
> http://webhosting.yahoo.com
>
>
===========================================================================
> 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".


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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