Skip to main content

I finally fixed my first Mustang bug!

Posted by joshy on April 18, 2006 at 5:22 PM PDT

So here it is, I finally fixed my first bug in Mustang. By this I do not mean that I have fixed only one bug during my year at Sun, but that I finally fixed the very first one I started on. The bug is JProgressBar (indeterm.) renders wrong on WindowsLookAndFeel, Windows2000 + XP, which basically means that indeterminate progress bars look horrible on XP.

Here's what progress bars used to look like:
before.png

And here's what it looks like now.
after.png

And here's what a native XP progress bar looks like:native.png

And here's what Vista's progressbar looks like:NetBeansScreenSnapz003.png

:) Okay, so that's not really Vista, but I can dream can't I?

Now you may ask, Why did it take me a year to fix the bug? Why, because it was hard, of course. :) Okay, the real reason is that there is a big difference between fixing a bug and fixing it the right way, as I have discovered. I went through six different possible fixes before I found a way that would look correct, work with any XP Visual Style (not just the ones that XP comes with) will mostly look okay on Vista, and will not break backward compatibility for existing programs. A tall order, which is why it took me learning more about the innards of Swing before I could do it. I think the results were worth it though.

Oh, and stay tuned. There are loads more Windows Look and Feel fixes coming soon.