Skip to main content

I need help tracking down a bug with the WindowsTableHeaderUI

Posted by joshy on July 18, 2006 at 10:07 AM PDT

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)
Related Topics >>

Comments

More than likely it's a different symptom of one of these ...

More than likely it's a different symptom of one of these bugs:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6429812
http://bugs.sun.com/view_bug.do?bug_id=5049957

Hi Problem happens on all

Hi Problem happens on all JDK 1.5.0 versions while using the Aero glass theme on Windows 7 (Probably on Vista too) On JDK 1.6 problem is solved. Is there a fix besides reverting to an alternate header UI? Avital