'How do I modify a look and feel system class such as com.sun.java.swing.plaf.windows.WindowsTableHeaderUI

I need to make a change to this class, there is no way for me to just subclass in normal way. So I can modify the java file (or make a copy of it) but how do I get my Swing application to use this version instead of the one provided by the Java runtime?

What I am trying to do is make a copy of com.sun.java.swing.plaf.windows.WindowsTableHeaderUI and fix it, so I cant just create a copy of the class sand put it into my own pacakage hierachy as I dont have access to many of the classes referred to in the class (such as XPStyle) so how do i replace the system class?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source