JavaFx 2.0: Z-Order Stage controls

JavaFx 2 has built a couple of methods for managing z-order, but they are not very fine-grained. You can call toFront () or toBack (). But what if you want to insert a visual element, say, right above level 4?

+5
source share
1 answer

You can achieve this by getting the children of the ObservableListparent node and processing them, for example add(int index, Node element):

parent.getChildren().add(4, visualElement);

AFAIK toFront () and toBack () work the same.

+3
source

All Articles