Click to See Complete Forum and Search --> : Implement gradual visibility to JPanel


MazOz
May 9th, 2010, 11:13 PM
Hi

I have a JPanel which I want to gradually set visible i.e create a sliding open effect. Currently the setVisible(true) opens it too quickly and I would like it to be more smooth and gradual.
Thinking of putting an component listener on the jpanel and then somehow using a swing timer to open it gradually. Any ideas/suggestions would be appreciated.

Thanks

Londbrok
May 10th, 2010, 01:28 AM
Theres a bundle of open source projects for various kinds of animating effects to boost up your swing. Google for instance the transitions API and AnimatingCardLayout. You may also like to check the "Swing Hacks" -book. Though bought a copy, I believe it is available in pdf online.