public static void hideSnapshotWithAnimation() {
		if( !FlatSystemProperties.getBoolean( "flatlaf.animatedLafChange", true ) )
			return;

		if( oldUIsnapshots.isEmpty() )
			return;

		// show snapshot of new UI
		showSnapshot( false, newUIsnapshots );

		// create animator
		animator = new Animator( duration, fraction -> {
			if( fraction < 0.1 || fraction > 0.9 )
				return; // ignore initial and last events

			alpha = 1f - fraction;

			// repaint snapshots
			for( Map.Entry<JLayeredPane, JComponent> e : oldUIsnapshots.entrySet() ) {
				if( e.getKey().isShowing() )
					e.getValue().repaint();
			}

			Toolkit.getDefaultToolkit().sync();
		}, () -> {
			hideSnapshot();
			animator = null;
		} );

		animator.setResolution( resolution );
		animator.start();
	}
Starts an animation that shows the snapshot (created by {@link #showSnapshot()})
with a decreasing alpha. At the end, the snapshot is removed and the new UI is shown.
Invoke after updating UI.
flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatAnimatedLafChange.java