I use gwt popup to show some messages, but it is not displayed in the center of the display event if i call popup.center(). Actually it is not centered only the first time, if i close it and open it again every thing is ok, but not the first time. How to fix that?
GWT.runAsync(new RunAsyncCallback() {
@Override
public void onSuccess() {
Image fullImage = new Image(optionImageName);
fullImage.setAltText("Loading image ...");
imagePopup.setWidget(fullImage);
imagePopup.center();
}
});
I found this question on http://www.devcomments.com/gwt-Popup-is-not-centered-at107182.htm, and today I have had this problem too. I found the answer and i will post it here for future reference.