public static void applyRenderingHints(@NotNull Graphics2D g) {
    Toolkit tk = Toolkit.getDefaultToolkit();
    Map<?, ?> map = (Map<?, ?>)tk.getDesktopProperty(DESKTOP_HINTS);
    if (map != null) {
      g.addRenderingHints(map);
    }
  }
public static void applyRenderingHints(@NotNull Graphics2D g)