How to bring a WindowPane on the Top ?

Since I have tried to use setZIndex with no useful result, and after I have read various post in the forum ...
I have experienced the following easy "trick":

myPane.setVisible(false);
myPane.setVisible(true);

Is there someone that can suggest me a better way ?

ScoPi's picture

I'm not familiar with

I'm not familiar with setting the Z index and I haven't used WindowPanes non-modally, but I was under the impression that the Z index was determined by where in the list of children a WindowPane is (in its parent container). As a result, I would imagine that removing the WindowPane from its parent and then re-adding it would also do the trick.