Q:

GWT launch method only when panel is loaded

I've to launch a Javascript function from Java only when all div are loaded into my VerticalPanel, otherwise my Javascript function will throw an exception because of the element is not yet in the page.
How can I do?
This is my code:

@UiField VerticalPanel areaBody;

areaBody.addHandler(new MyLoadHandler(), LoadEvent.getType());

public class MyLoadHandler implements LoadHandler {

    @Override
    public void onLoad(LoadEvent event) {
        // TODO Auto-generated method stub

        Window.alert("onLoad");

    }
}

A:

to launch javascript from java you can use native methods:
public static native void alert(String msg) /*-{
  $wnd.alert(msg);
}-*/;

for a short example look here
more explanation you can find in this documentation
EDIT:
if I got it right then just add a Scheduler which will execute when control is returned to the JavaScript event loop.
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
    @Override
    public void execute() {
        executeYourJavaScript(); 
    }
});

more explanation here and a little example

