Skip to main content

Extreme GUI Makeover: 2006

Posted by zixle on November 21, 2006 at 7:42 AM PST

During one of many brainstorming sessions for the 2005 JavaOne
conference the Swing team latched on to the idea of doing a makeover
talk. Borrowing the idea from the popular TV show, the idea was to
makeover an ugly ducking of a Swing app, turning it into a beautiful
swan. Shannon, href="">Romain and myself had a great
time putting the app together and doing the session; as a bonus, the
session was one of the most popular talks. WOW! Because we had so much
fun, and because of the popularity, we decided to do a similar session
for 2006.

For the 2006 session we decided to make over a mail client. A good
chunk of my day goes into reading email, so I had a plethora of ideas
in this area. This was true of Romain and Shannon as well. We didn't
have the time to craft a real mail client, or the time to come up to
speed on one of the many open source mail clients out there. As such,
we put together a shell of a mail app. It has just the amount of
functionality we needed for the demo, that's it. We tuned for demos,
with just the windows look and feel. Romain says it works on OS X,
which is surprising. There is plenty of stuff that doesn't work, and
you can get stuck in areas where you can't get out. It's most
defintely a DEMO! Let me say that one more time, THIS IS A DEMO!
None-the-less we've gotten a slew of email requests for the code, some
friendly, some not so friendly. So, in all it's glory, here's the href="">code.

Here's a screen shot of the before:

And the after, with a traditional table:

A screen shot with a rich list:

The screen shots don't do the transformation justice; they can't show
transitions, animation, custom drag and drop effects... For that, you
need to run the app. You can run the app by downloanding href="">this
zip file, extracting it, and invoking

java -jar
on the jar file.

All 103 slides from the session can be found here.

A big part of the presentation was showing the ugly, then
transitioning to the improved. To provide a similar experience for
those trying the app now, I scripted the whole app with Robot. If you
don't move the mouse, the demo will drive itself. It'll take you
through each of the stages showing the before and after. I'll go over
how this was done in more detail later. For those that want to know
now, look in the appscripter package.

Wouldn't it be cool if I did voice overs? Or music? Or provided links
to the code while running it? Or fixed some bugs in the message
handling? Or added comments? Yes, yes and YES! The list of things I
would like to do to this app could keep me employed for years. But, I
know folks want the source, so we're cutting the cord. Have at it! I
do promise Shannon, Romain and myself will go over aspects of the
session in more detail over time.



PS For those thinking a webstart link would be ideal. I agree. For
JavaOne I threw a 5MB mailbox at the original parsing code, and it
took minutes. I rewrote it using NIO, which means it won't work from
WebStart. Hans pointed this out months ago. Not having time myself, I
dropped the gauntlet and challenged Hans to give me the code that
would suck down the mailboxes so that it would work from
WebStart. Months later that code isn't in my mail box. Perhaps the
public humiliation will be enough to get Hans to give me the code and
I'll update the app later on;)

Related Topics >>