How to dynamically attach/detach a node?


How do you dynamically attach/detach a node after initially adding objects to the root via simpleSetup() of a class extending SimpleCanvasImpl?

That is, I want to add a child to the root after a SimpleCanvasImpl is created.

Thanks in advance.

rootNode.attachChild / removeChild

When I attach a node outside the  simpleSetup() method, it is not displayed.

Don't forget your update calls (updateGeometricState(), updateRenderState()…).

Have you tried working through the tutorials yet? I highly recommend it.