If you have no other choice, then you should find out what exactly this class uses from SwingUtilities2, and then make a proxy for this function in your own SwingUtilities2. Then you can paste it into your own com.sun.java.swing package, which will overlap with the original one, and if the same classloader that loads your component also knows about SwingUtilities2, then it will see another and your application will work.
Depending on what the component is and what it used from SwingUtilities2, it can be much more complicated than updating it or even rewriting it.
source
share