Scene root and Parent subclasses
854072Jul 4 2011 — edited Jul 5 2011Hi,
I get this error when trying to promote a Parent object (that's a child of the scene root node) to be the new scene root node.
java.lang.IllegalArgumentException: StackPane@208a0544is already inside a scene-graph and cannot be set as root
Shouldn't it be possible do it? or there's another way?
If it's needed to be known, I'm trying to achieve a transition animation between two contents in the window (I don't know how to call it), I guess between two root nodes.
I also have the doubt, how the getChildren() method in the class Parent is protected and be public in the class Pane (that inherits from Parent)?
How it's even possible that the language allows a protected method to be exposed. I know many things about Java but I think I didn't know that. I thought that it was against OOP.
Edited by: talizmelf on Jul 4, 2011 3:41 PM