TransitionPane

Hi there,
I'm a newbie and I've many problems with the TransitionPane.
can somebody post the simple code about the use of the TransitionPane from server side?

Thanks

tliebeck's picture

First set the transition

First set the transition effect.

Then just invoke transitionPane.removeAll(), followed by transitionPane.add(theNewComponent).

TransitionPane can only contain one child at a time, so always invoke removeAll first. If you have problems with backgrounds showing through, wrap the children in a ContentPane with a set background color/image. Note that the transition effect will only play when children are removed from and added to the TransitionPane itself.