void () { if (myOwner != null) { myOwnerWindow = SwingUtilities.getWindowAncestor(myOwner); if (myOwnerWindow != null) { myLastOwnerPoint = myOwnerWindow.getLocationOnScreen(); myOwnerListener = new MyComponentAdapter(); myOwnerWindow.addComponentListener(myOwnerListener); } } }