@Override
    public void _setOkBadge(@Nullable JFrame frame, boolean visible) {
      EDT.assertIsEdt();

      BufferedImage appImage = getAppImage();
      if (appImage == null) {
        return;
      }

      Pair<BufferedImage, Graphics2D> img = createAppImage(appImage);

      if (visible) {
        Icon okIcon = AllIcons.Mac.AppIconOk512;
        int w = img.first.getWidth();
        if (w != 128) {
          okIcon = IconUtil.scale(okIcon, frame != null ? frame.getRootPane() : null, w / 128f);
        }

        int x = w - okIcon.getIconWidth();
        int y = 0;

        okIcon.paintIcon(JOptionPane.getRootFrame(), img.second, x, y);
      }

      setDockIcon(img.first);
    }
@Override
    public void _setOkBadge(@Nullable JFrame frame, boolean visible)