public void setDuration( int duration ) {
		throwExceptionIfRunning();
		if( duration <= 0 )
			throw new IllegalArgumentException();
		this.duration = duration;
	}
Sets the duration of the animation in milliseconds.

@throws IllegalStateException if animation is running
@throws IllegalArgumentException if duration is &lt;= zero
flatlaf-core/src/main/java/com/formdev/flatlaf/util/Animator.java