Rectangle () { Rectangle bounds = new Rectangle(myComponent.getBounds()); final JLayeredPane layeredPane = myParentComponent.getRootPane().getLayeredPane(); return SwingUtilities.convertRectangle(myComponent, bounds, layeredPane); }