static void animateBounds(final Component c, final Rect a, final Rect b) { final long startTime = sysNow(); awtEvery(c, 50, func { double s = msToSeconds(sysNow()-startTime); if (s >= 1) { setBounds(c, b); false; } setBounds(c, blendRects(a, b, s)); null; }); }