boolean (Component cmp) { if (cmp instanceof JComponent && Boolean.TRUE.equals(((JComponent)cmp).getClientProperty(InlineActionsUtilKt.INLINE_BUTTON_MARKER))) return true; if (cmp instanceof Container) { for (Component child : ((Container)cmp).getComponents()) { if (containsInlineButtons(child)) return true; } } return false; }