void (@NotNull Component component, boolean opaque) { if (!(component instanceof JComponent)) { return; } forEachComponentInHierarchy(component, c -> { if (c instanceof JComponent) { ((JComponent)c).setOpaque(opaque); } }); }