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

NullPointerException in DefaultTableCellHeaderRenderer.getColumnSortOrder()

    Details

    • Subcomponent:
    • Introduced In Version:
      6u3
    • Resolved In Build:
      b38
    • CPU:
      x86
    • OS:
      windows_xp, windows_vista
    • Verification:
      Verified

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: