A number of widgets have a BringToFront property, the Pane does not have one.
I have added buttons on a form after I added the pane, and now the buttons are above the pane and showing up.
I have not found a way to make them go back.
I could make them invisible (and visible again when I remove the pane) but there must be a better way...
Enrique, my savior!
Thank you so much, I did not know the Tree View actually shows the zOrder...
It is actually convenient but I had completely missed it.
Enjoy coffee on my account!
I'm posting this here as a way to determine Z-order at runtime in B4J that I haven't seen in the forum. I had a similar problem and found that all Jafa FX nodes have a toFront and toBack method that can easily be invoked using a JavaObject.
B4X:
Private cvs As Canvas
Dim cvsjo As JavaObject
...
cvs.Initialize("")
pnlBackground.AddView(cvs, 0, 0, cvsSize, cvsSize)
...
cvsjo = cvs
cvsjo.RunMethod("toFront", Null)