Skip to main content

Who doesn't want the transition effects in Swing applications?

Posted by kirillcool on April 9, 2007 at 10:45 AM PDT

Over the past two years, the Swing community has seen a few efforts to provide transition effects. I had first heard it mentioned by Chet in 2005 in one of his JavaOne sessions. He was speaking about not "surprising" the user when you change the UI elements. When a control is added, it can fade in or fly in, when a control is removed, it can fade out or fly out, and when a control changes location, it can slide to the new location. Joshua and Chris's "Swing Hacks" (that was published that same year) provided an implementation of transitions on tabbed panes that allows PowerPoint-like crossfades on tab selections.

The last year saw a number of attempts to provide generic implementations of the transition effects:

  • The TransitionLayout introduced in my blog which is available at the look-and-feel level (with a few limitations).
  • The JXLayer approach pioneered by Alex which is available under all look-and-feels.
  • Yet another approach from Simon.

On top of these three, Chet and Romain are working on yet another implementation, tentatively called AnimTrans (or TransAnim? ), which should be publicly available around this year's JavaOne.

So now that we have at least four different implementations of the same thing, the main question is "do we really need them at all?". I know, i know, your first reaction would "OMG, what are you talking about, this is way too cool and i can't wait to use this in my next w00t app". Just look at the number of comments on the three blogs mentioned above (about 40 on Simon's blog, about 40 on mine and even more on Alex's). However, this is only one part of the story.

The first entry about TransitionLayout on my blog was last September (more than seven months ago). Since then, i haven't received a single request / defect report / question about it. And believe me, there could've been plenty, especially with all the restrictions placed on the application code (playing with opacity, visibility, borders, layout manager and complete lack of support for fading out the removed components). I've asked Alex about what type of questions does he get on JXLayer, and it's the same with him - not a single question about the transition effects. I can't say about Simon, but i feel that it's the same there.

Which brings me to a puzzling conclusion - perhaps the Swing developers just want to see the shiny things (and be reassured that they are possible not only in Flash), but have no interest in using them outside of the demoes... What do you think?