void (@Nullable JComponent anchor) { super.setAnchor(anchor); List<JBLabel> labels = UIUtil.findComponentsOfType(myCustomPanel, JBLabel.class); for (JBLabel label : labels) { label.setAnchor(anchor); } }