boolean (final MouseEvent e) { final Rectangle compBounds = myComponent.getVisibleRect(); final Point compPoint = SwingUtilities.convertPoint(e.getComponent(), e.getPoint(), myComponent); return compBounds.contains(compPoint); }