I am trying to create by own Leaf node by subclassing Leaf. When I try to
add my custom Leaf to a BranchGroup I get the following Exception.
Exception in thread "main" java.lang.NullPointerException
at
javax.media.j3d.GroupRetained.checkValidChild(GroupRetained.java:356)
at javax.media.j3d.GroupRetained.addChild(GroupRetained.java:366)
at javax.media.j3d.Group.addChild(Group.java:261)
at Test.main(Test.java:12)
I am using jdk1.3 on win98 with OpenGL j3d version 1.2 beta 2. This output
was generated by the simple test program attached. The Leaf class defines
no methods, so I'm not sure what I have to do to put it in the proper state
to avid the preceding Exception. I've checked the specs and docs and I'm
still clueless. Does anyone know what is causing this or how to avoid it??
Thanks for any help..
Test.java