boolean (MouseEvent event) { final Object source = event.getSource(); if (source instanceof Component) { return SwingUtilities.windowForComponent(myTabs) == SwingUtilities.windowForComponent((Component)source); } return false; }