Window (@NotNull Component content) { Window window = SwingUtilities.getWindowAncestor(content); if (window == null) { if (LOG.isDebugEnabled()) { LOG.debug("no window ancestor for " + content); } } return window; }