private static void paintError(Graphics g, ThumbnailComponent tc) {
    Font font = getSmallFont();
    FontMetrics fontMetrics = g.getFontMetrics(font);

    Messages.getErrorIcon().paintIcon(
      tc,
      g,
      5 + (ImagesIcons.ThumbnailBlank.getIconWidth() - Messages.getErrorIcon().getIconWidth()) / 2,
      5 + (ImagesIcons.ThumbnailBlank.getIconHeight() - Messages.getErrorIcon().getIconHeight()) / 2
    );

    // Error
    String error = getSubmnailComponentErrorString();
    g.setColor(JBColor.RED);
    g.setFont(font);
    g.drawString(error, 8, 8 + fontMetrics.getAscent());
  }
private static void paintError(Graphics g, ThumbnailComponent tc)