static JComponent jMaxSpeedAnimationWithStats(IF0_Pair renderFrameWithStats) { new ImageSurface is; is.autoZoomToDisplay(true); new DoubleFPSCounter fps; var lblStats = jlabel(); awtCalcContinuously(is, -> { S stats; try { var imageAndStats = renderFrameWithStats!; fps.inc(); is.setImage(pairA(imageAndStats)); stats = joinNemptiesWithComma(fps, pairB(imageAndStats)); } catch print e { stats = exceptionToStringShort(e); } setText(lblStats, stats); }); ret centerAndSouth(jscroll_center_borderless(is), withMargin(lblStats)); }