Submitted On 05-MAR-2008
_qb_
A workaround is to deactivate the vista AERO design.
Submitted On 14-APR-2008
cbradley
adfs
Submitted On 14-APR-2008
cbradley
I would recommend increasing the priority of this bug, as there is no documented workaround.
As such, any application with a JTabe in it throws a runtime exception, rendering the application unusable.
I tried deactivating the vista Aero design and it did not work for me.
Submitted On 14-APR-2008
cbradley
Partial Correction:
Disabling the Vista AERO design alone does not work around
the problem. I've also re-created the same problem on the Vista
Basic design as well.
I HAVE had success if I change the Vista look and feel to "Windows Classic" -- haven't tested it on the others.
Of course, this is an unacceptable workaround, but it will do
in a pinch.
Instructions on how to change aero interface:
http://www.howtogeek.com/howto/windows-vista/disable-aero-on-windows-vista/
http://wismboh.blogspot.com/2007/03/how-to-activate-and-deactivate-windows.html
http://www.vikramlakhotia.com/Deactivation_the_Window_Vista_Aero_colour_scheme.aspx
Essentially, it's the following:
1. Right click on an empty part of the desktop.
2. Select "Personalize"
3. Click "Window Color and Appearance"
4. If currently using Aero, then click "Open classic appearance properties" link at bottom, OTHERWISE skip to step 5.
5. In the Color scheme list, click "Windows Classic" and then click OK.
6. Restart your broken Java app -- the exception should now not be thrown.
Submitted On 28-APR-2008
flpc
Another workaround - which is still not a good user expereience is to adust compatibility of the program in vista via:
Right Click on program icon
1. Select "Property"
2. Click on "Compatibility"
3. Click on the box "Disable Visual Theme"
Submitted On 30-JUN-2008
jdugo
Any plans to fix this in 1.6.0.7? Without a legitimate workaround, we are completely blocked on Vista and cannot support 6u10
Submitted On 02-JUL-2008
Matt.Kearse
This bug was fixed over a month ago, but I'm still eargerly awaiting even a beta version that contains the fix. Even the latest snapshot build of Java 6 update 10 (build 25) doesn't contain this fix. Does anyone know when this fix might become available?
Submitted On 25-JUL-2008
Kleopatra
Actually, I think this is not fixed (assuming the above suggestion is implemented): the underlying issue is that the renderer must cope with a null table. It could as long as it was out in the open (in JTableHeader) by always checking against null table. With hiding the default implementation in the sun package (which was a crazy move, IMO) that null checking probably was lost or lost at some places.
My 0.02 cents (Euro ;-)
Jeanette
Submitted On 21-AUG-2008
martinm1000
This bug STILL EXISTS on 6u10 RC.
Submitted On 29-AUG-2008
This bug still exists for me with JDK6u10rc (b28):
C:\Program Files\Clerity Solutions\UniKix_Manager_2.1.0\lib>java -version
java version "1.6.0_10-rc"
Java(TM) SE Runtime Environment (build 1.6.0_10-rc-b28)
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)
C:\Program Files\Clerity Solutions\UniKix_Manager_2.1.0\lib>java -jar manager-um.jar
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.swing.table.DefaultTableCellHeaderRenderer.getColumnSortOrder(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRenderer.paint(Unknown Source)
at javax.swing.CellRendererPane.paintComponent(Unknown Source)
at javax.swing.plaf.basic.BasicTableHeaderUI.paintCell(Unknown Source)
at javax.swing.plaf.basic.BasicTableHeaderUI.paint(Unknown Source)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
This is on a fully patched Vista Business SP1. My application remains unusable.
Submitted On 19-SEP-2008
gmutis
I have the same issue with my application
Submitted On 24-SEP-2008
martinm1000
STILL EXISTING in 6u10 jdk-6u10-rc2-bin-b32-windows-i586-p-12_sep_2008.
Are we going to have wait for 6u11 ?
Submitted On 21-NOV-2008
Kleopatra
To repeat: the basic issue is that a tableHeader _must_ work as a stand-alone component (unattached to a table instance). One implication being, that the default header renderer _must_ cope with a null table parameter _always_
Guys and gals, I honestly don't understand how anybody could mark all these header NPE-related issues as fixed - because the root cause definitely is _NOT FIXED_. This is sooo frustrating - even in view of the massive brain drain from the core swing team. The remaining staff MUST learn how to recognize bugs and track and drill down and stress-test a seemingly working solution until you'r sure beyond any doubt its working.
So instead of running the example as given and lean back contentedly, run it with a null table parameter - it's still failing in Java(TM) SE Runtime Environment (build 1.6.0_10-b33) - well after the version mentioned in the fixed entry.
I would strongly suggest that you review _all_ related issues and the code to see if each and every table access is guarded against null. And give it top priority - NPEs are hurting everybody (amongst them the extension project SwingX) big style
Not amused
Jeanette
Submitted On 13-DEC-2008
agentis
I am experiencing the same bug in 6u11
svargas
Submitted On 06-FEB-2009
greggwon
This bug is definately not fixed! I too use the header renderer with a null table parameter because I just need to know how big the component is as in:
comp = tbl.getTableHeader().getDefaultRenderer().
getTableCellRendererComponent(
null, col.getHeaderValue(),
false, false, 0, 0);
headerWidth = comp.getPreferredSize().width;
It is vital that this work!
Submitted On 09-MAR-2009
akarl
Not fixed as of 6u12. I workaround this by setting XP compatibility mode on javaw.exe. This is not an acceptable workaround for end users.
Submitted On 09-MAR-2009
akarl
The original test case does not produce the error but as stated above, the core problem is not fixed. Below is a case that does create the problem although it is not a proper test case since it does not fail gracefully.
public class bug6668281 {
private static void createGui() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
e.printStackTrace();
}
JTableHeader header = new JTableHeader();
header.getColumnModel().addColumn(new TableColumn());
JFrame frame = new JFrame();
frame.getContentPane().add(header);
frame.setSize(new Dimension(320,200));
frame.setVisible(true);
System.out.println("end...");
}
public static void main(String[] args) throws Exception {
bug6668281.createGui();
}
}
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|