Hi, all: I am confused about the usage of Node.cloneNode(). I have an object extending SharedGroup class. I need to copy it with everything duplicated. Since the cloneNode() need to work with uncompiled sub-scenegraph. I called the function before calling .compile(). But I have problem to cast the output back to the object type which is a subclass of SharedGroup. I was wondering what the use of this .cloneNode() function. Could anyone please enlighten me or point me to an example? Thanks in advance!
Here is part of my codes (SharedTree01 extends SharedGroup) SharedTree01 shTree01 = new SharedTree01(); shTree01.setTreeColor(treeColorElement[6]); SharedTree01 anotherTree01 = (SharedTree01) ((Node) shTree01).cloneNode(true); I got ExceptionClassCast error for the last statement. Lan Wu-Cavener Research Associate and Programmer Dept. of Landscape Architecture =========================================================================== 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".