JComponent (JComponent middleItemComponent) { myNextStepLabel = new JLabel(); myNextStepLabel.setOpaque(false); if (ExperimentalUI.isNewUI()) { SelectablePanel result = SelectablePanel.wrap(middleItemComponent); PopupUtil.configListRendererFlexibleHeight(result); result.add(myNextStepLabel, BorderLayout.EAST); return result; } else { return JBUI.Panels.simplePanel(middleItemComponent) .addToRight(myNextStepLabel) .withBorder(getDefaultItemComponentBorder()); } }