From the JavaDocs of UIManager:
Once the look and feel has been changed it is imperative to invoke
updateUI
on allJComponents
. The methodSwingUtilities.updateComponentTreeUI(java.awt.Component)
makes it easy to applyupdateUI
to a containment hierarchy. Refer to it for details. The exact behavior of not invokingupdateUI
after changing the look and feel is unspecified. It is very possible to receive unexpected exceptions, painting problems, or worse.
If you change the look and feel after creating your frames (even if they're not yet visible) then you need to updateUI
for the change to take effect (or better, if you know you're always going to want to use a specific look and feel then set that in your main class before you create the frames in the first place).