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

SwingSet2 Demo: exceptions thrown out when one cell is empty in JTable demo

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 5.0u4
    • client-libs

      jdk1.5.0_04 b05, S10u1 b13, x86 and sparc

      reproduce steps:

      1. start mozilla
      2. load applet from http://baseman.prc/jdk-applet-demo/1.4.2/demos/jfc/SwingSet2/SwingSet2.html
      3. click the JTable demo tab
      4. make the first cell in the Favorite Number column empty
      5. click other cell in the table, exceptions thrown out in Java Console, and focus can not be moved away from this cell.

      Exception occurred during event dispatching:
      java.lang.NullPointerException
      at TableDemo$15.getColumnClass(TableDemo.java:550)
      at javax.swing.JTable.getColumnClass(JTable.java:2551)
      at javax.swing.JTable.getCellRenderer(JTable.java:5372)
      at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2009)
      at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1912)
      at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1718)
      at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
      at javax.swing.JComponent.paintComponent(JComponent.java:748)
      at javax.swing.JComponent.paint(JComponent.java:1013)
      at javax.swing.JComponent.paintToOffscreen(JComponent.java:5094)
      at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:279)
      at javax.swing.RepaintManager.paint(RepaintManager.java:1055)
      at javax.swing.JComponent._paintImmediately(JComponent.java:5042)
      at javax.swing.JComponent.paintImmediately(JComponent.java:4860)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:682)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:638)
      at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:618)
      at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:270)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:198)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:171)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:166)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:158)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:119)


      It seems only empty this cell the exceptions thrown out. This also happens by starting this demo by command line. On Linux is the same.

            shickeysunw Shannon Hickey (Inactive)
            qqcheng Qing-Hua Cheng (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: