Sometimes it is useful to have one node positioned over another node without changing the order of the nodes within the layout pane. An Example is the VBox. A change in the drawing order also affects the ordering/positioning inside the parent. A good example is a simple window with a menubar, some content and a footer in which the menubar and the footer should drop a shadow on the content.
To avoid this issue one can use a GridPane instead (the components positioning does not depend on the order the components are added), but this is often overkill for the developer. A z-index like in the W3C specifications (change of the drawing order, but not of the layout order) would be highly welcome.
To avoid this issue one can use a GridPane instead (the components positioning does not depend on the order the components are added), but this is often overkill for the developer. A z-index like in the W3C specifications (change of the drawing order, but not of the layout order) would be highly welcome.
- relates to
-
JDK-8099433 Node.toFront/toBack don't work with Container layouts
- Closed