List<JComponent> () { List<JComponent> components = new ArrayList<>(); if (UIUtil.isFocusable(myLayout.myCheckBoxComponent)) { components.add(myLayout.myCheckBoxComponent); } components.addAll(ContainerUtil.filter(myLayout.myButtonComponents, UIUtil::isFocusable)); return components; }