docs: public static BufferedImage toImage(@javax.annotation.Nonnull final Component component) {
      try {
        com.simiacryptus.util.Util.layout(component);
        @javax.annotation.Nonnull final BufferedImage img = new BufferedImage(component.getWidth(), component.getHeight(), BufferedImage.TYPE_INT_ARGB_PRE);
        final Graphics2D g = img.createGraphics();
        g.setColor(component.getForeground());
        g.setFont(component.getFont());
        component.print(g);
        return img;
      } catch (@javax.annotation.Nonnull final Exception e) {
        return null;
      }
    }