Be Ready for Java SE 6, Remove This Hack!

Swing provides a very interesting class called This class can be used for many things, like setting antialiased text on component in J2SE 5.0. Yet, SwingUtilities2 has never been part of the API and might work only with Sun's VM: it is an undocumented, unsupported class used only for internal implementation details. And if your program relies on it, you are in big trouble for Java SE 6 (“Mustang”)…

SwingUtilities2 has moved! The Swing Team keeps changing this class and there is no guarantee for you that something will work from one version to another. For instance, all the antialiasing related methods have disappeared from 1.5 to 1.6. That's why SwingUtilities2 has been moved to another package. This package is non public and its source code is not provided with the JDK.

If your application calls SwingUtilities2 directly, please update your code to get rid of this dependency. Mustang is not here yet but the weekly builds are already failing to run some applications because of this change.

One Response to “Be Ready for Java SE 6, Remove This Hack!”

  1. Patrizier 4 says:

    Hello! That is a interesting edu blog. I think edu stands for high quality posts =)