code: public synchronized void nextFrame() {
          currentFrame++;
          if(currentFrame >= frames.size()) {
              currentFrame = 0;
          }
          super.setLines(frames.get(currentFrame));
          invalidate();
      }
docs: Advances the animated label to the next frame. You normally don't need to call this manually as it will be done
  by the animation thread.