void (@NotNull AnActionEvent e) { old = new TreeSet<>(top); top.clear(); Window[] windows = Window.getWindows(); for (Window window : windows) { if (window.isVisible() && (window instanceof JFrame f)) { checkParents((JComponent)f.getContentPane(), top, LIMIT); } } System.out.println("Top " + LIMIT + " component parents"); for (Pair<JComponent, Integer> pair : top) { System.out.println( pair.first.getClass().getName() + " (" + pair.second + " children)" + getChange(old, pair.first, pair.second)); } }