Rectangle () { Rectangle bounds = component.getBounds(); Point location = bounds.getLocation(); SwingUtilities.convertPointToScreen(location, myLayeredPane); bounds.setLocation(location); return bounds; }