void () { if (myPopup == null || !myPopup.isVisible() || myPopup.isDisposed()) { return; } final Window popupWindow = SwingUtilities.windowForComponent(myPopup.getContent()); if (popupWindow == null) { return; } updatePopupWidth(popupWindow); updatePopupHeight(popupWindow); }