I need help tracking down a bug with the WindowsTableHeaderUI

Chances are no one reading my blog will be able to answer this question but hopefully in the future someone will run across this post in Google and respond with the answer.

Have you ever experienced a NullPointerException with the stack trace below or something similar to it? This bug is caused by a particular third party Windows XP visual style (theme) and has been reported in many locations on the web (see this Google search) but I have been unable to recreate it because no one has mentioned the theme they were using! I have hacked some of my own themes to remove the ContentMargins property (which I suspect is the culprit) but I get a different error. I have a patch which should fix this error in either case, but I'd like to recreate the error before I fix it so that I know I'm fixing the real cause.

Officially we only support the built in XP visual styles but we try to support 3rd party ones as well when we can. Since this is a bug that actually crashes programs it's a high priority for me to fix it.

So: If anyone has experienced this error please post to this blog and email me (joshua.marinacci@sun.com) the name of the theme you are using (or a copy of the theme itself if you have it).

Thanks! - Josh

java.lang.NullPointerException
at javax.swing.border.EmptyBorder.<init>(Unknown Source)
at
com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRenderer.ge=
tTableCellRendererComponent(Unknown
Source)
at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderRenderer(Unknown
Source)
at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderHeight(Unknown
Source)
at javax.swing.plaf.basic.BasicTableHeaderUI.createHeaderSize(Unknown
Source)
at javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(Unknown
Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.ViewportLayout.preferredLayoutSize(Unknown Source)
at java.awt.Container.preferredSize(Unknown Source)
at java.awt.Container.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.ScrollPaneLayout.layoutContainer(Unknown Source)
at java.awt.Container.layout(Unknown Source)
at java.awt.Container.doLayout(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
Talk to me about it on Twitter

Posted July 18th, 2006

Tagged: java.net