Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6668281

NullPointerException in DefaultTableCellHeaderRenderer.getColumnSortOrder()

XMLWordPrintable

    • 6u3
    • b38
    • x86
    • windows_xp, windows_vista
    • Verified

        FULL PRODUCT VERSION :
        java version "1.6.0_04"
        Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
        Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)

        ADDITIONAL OS VERSION INFORMATION :
        Win32 Vista Business

        A DESCRIPTION OF THE PROBLEM :
        NullpointerException when trying this:

                JTableHeader header = new JTableHeader();
                TableCellRenderer headerRenderer = header.getDefaultRenderer();
                JTable table = new JTable();
        // table.setAutoCreateRowSorter(true);
                headerRenderer.getTableCellRendererComponent(table, "test", false, true, -1, 0);


        uncommenting the setAutoCreateRowSorter line does not help.
        Trying to set an own RowSorter does not help either.

        This worked fine in 1.6.0_03.


        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        java.lang.NullPointerException
        at sun.swing.table.DefaultTableCellHeaderRenderer.getColumnSortOrder(Unknown Source)
        at com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRenderer.getTableCellRendererComponent(Unknown Source)

        REPRODUCIBILITY :
        This bug can be reproduced always.

        Release Regression From : 6u3
        The above release value was the last known release where this
        bug was not reproducible. Since then there has been a regression.

              idk Igor Kushnirskiy (Inactive)
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: