I'm developing an app in JAVAFX. Mainly, the app is using a TabPane
controller. In the first tab, i'm loading a controller for a StackPane
. In the StackPane
i'm loading as a default, one list view with custom cells. In each cell i'm having some buttons. I want to add a new pane in the stack pane and bring it to front when a button is clicked.
I tried with the toFront()
and toBack()
but i can't get anything working.
I've check, and both panes are loaded and their content is the right one.
I can't attach photos because i don`t have enough rep.
Any suggestion is appreciated.
It's hard to know exactly what's going wrong since you didn't post any code, but from the
StackPane
Javadocs:So to move a
Node
to the front, you should move it to the end of the list: