DimensionToVector

Animates a Dimension as a two-dimensional vector of its width and height.

Each frame is rounded to whole units and floored at zero, because a spring overshoots below its target and a component cannot have a negative size. Every frame is a new Dimension: Component.setPreferredSize stores the instance it is passed, so a reused one would let a later frame change the value a component holds.