private static void repaintIndex(@NotNull JList<?> list, int index) {
    Rectangle bounds = index < 0 ? null : list.getCellBounds(index, index);
    if (bounds != null) list.repaint(0, bounds.y, list.getWidth(), bounds.height);
  }
private static void repaintIndex(@NotNull JList<?> list, int index)