JComponent (JComponent component) { BorderLayoutPanel panel = JBUI.Panels.simplePanel(component); panel.setBackground(JBColor.lazy(() -> Objects.requireNonNullElse(component.getBackground(), UIUtil.getPanelBackground()))); panel.addToRight(myLanguageChooser); return panel; }