Building Swing comes in handy occasionally specifically if you want to throw in debug information for performance tuning.
Building Swing without building the whole JDK using ANT.
Those of you who are dying to fix your
favorite Swing bug, might have been a bit put off by
the complexity of the full JDK build. For those people
who just want to build swing and be able to play around
with Swing code changes, you might consider using the
following ant file to build just swing. This way, you
dont need the native compilers or any tool other than
ant and the binary and source snapshots.
Read: Building Swing without building the whole JDK using ANT