Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Scene root and Parent subclasses

854072Jul 4 2011 — edited Jul 5 2011
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 2 2011
Added on Jul 4 2011
12 comments
2,567 views