Try something like this
Try this way
How do you check it's not here - is it not in DOM tree?
when I put it in RootTree in this way:
( nothing is seen yet )
It is in DOM tree, Isn't it ?
All I want to do is to create a modalPanel dynamically at the centre of my screen. ?
my java code above doesn't produce it.
Note: I tried this "controlPanel.getChildren().add(myPanel1);"
It can be present but being invisible because hidden. Check DOM tree.
according to firebug it exits.
how can I make it visible ?
does "myPanel1.setKeepVisualState(true)" make it visible ?
No, this doesn't make it visible. Use JS API or "showWhenRendered" attribute.