@Override
		public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) {
			Boolean b = getStyleFromListUI( c, ui -> ui.showCellFocusIndicator );
			boolean showCellFocusIndicator = (b != null) ? b : this.showCellFocusIndicator;
			if( !showCellFocusIndicator )
				return;

			// paint focus indicator border only if multiple items are selected
			JList<?> list = (JList<?>) SwingUtilities.getAncestorOfClass( JList.class, c );
			if( list != null && list.getMinSelectionIndex() == list.getMaxSelectionIndex() )
				return;

			super.paintBorder( c, g, x, y, width, height );
		}
Border for selected cell that uses margins and paints focus indicator border
if enabled (List.showCellFocusIndicator=true) and multiple items are selected.
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatListCellBorder.java