Skip to main content

Can't attach java3d objects to branchgroup imported from another japplet

1 reply [Last post]
mitrajit
Offline
Joined: 2011-12-12
Points: 0

I'm doing a web based java 3d program where within a html page two JApplet will run simultaneously and can communicate with each other. Let the classes are A and B and both extend JApplet. Class A will draw some geometry in its canvas3d while its running. Now my actual requirement is, in class B there is a button (name GRAB) and whenever I clicked on it, it should import the branchgroup or transformgroup or the geometry objects from class A and add it to the branchgroup of class B. It's imported but I can't add it, and I don't know why? Please download the attached files and check it. So please help me guys.... Thank you.

AttachmentSize
deploy.zip3.51 KB

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jfp
Offline
Joined: 2013-03-27
Points: 0

I cannot really see what happens because I never used this coding style (two linked applets).
Here is how I understand what you want :
- create some scenegraph, may be with objects. On top there is a BranchGroup. This graph is live.
The only way to add something is trough a Branchgroup.
I think it would easier for me to help you if both classes where mixed (nested class??), almost for test purpose. The applet cannot be run because class Shapes is not in your ZIP.
Also notice that in ViewPlatform.Drawcube() variables hide there definition in the other class.
I hope this helps a little
regards
jfp