/** * Creates an animator for source. * * @param source the source for this animator. * @param initDelay the initial delay before timer starts. * @param delay the delay of the timer * @param totalSteps the number of steps. If -1, it means this animator will never stop until {@link #stop()} is * called. */ public Animator(Component source, int initDelay, int delay, int totalSteps) { _source = source; _totalSteps = totalSteps; _timer = createTimer(delay, this); _timer.setInitialDelay(initDelay); }