Component (JList<? extends ScopeDescriptor> list, ScopeDescriptor value, int index, boolean isSelected, boolean cellHasFocus) { // copied from DarculaJBPopupComboPopup.customizeListRendererComponent() Component component = delegate.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (component instanceof JComponent && !(component instanceof JSeparator || component instanceof TitledSeparator)) { ((JComponent)component).setBorder(JBUI.Borders.empty(2, 8)); } return component; }