@Override
      public void paintNow(int frame, int totalFrames, int cycle) {
        myAlpha = 1 - (float)(1 - Math.cos(Math.PI * frame / (float)totalFrames)) / 2;
        doPaint();
      }
@Override
      public void paintNow(int frame, int totalFrames, int cycle)