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

NPE thrown in Table Demo of SwingSet2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.0, 1.4.2
    • client-libs
    • generic, sparc
    • generic, solaris_9

      This bug is observed on all platforms viz. Solaris, Win-XP, Linux 7.2 and on metal, GTK, XP and Motif LAF.

      Steps To reproduce:
      1. Select Table Demo in SwingSet2
      2. Click any cell adjacent to the cell containing Image.
      3. Type some thing.
      4. Now using mouse shift the focus to some other cell.
      5. Now type some thing.
      6. The newly typed data is still typed in the cell first edited.
      7. Now go to the first cell and delete all the content.
      8. Now press Tab key. It will throw a NPE.

      java.lang.NullPointerException
              at TableDemo$10.getColumnClass(TableDemo.java:481)
              at javax.swing.JTable.getColumnClass(JTable.java:1752)
              at javax.swing.JTable.getCellRenderer(JTable.java:3700)
              at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:1148)
              at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1051)
              at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:974)
              at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
              at javax.swing.JComponent.paintComponent(JComponent.java:541)
              at javax.swing.JComponent.paint(JComponent.java:808)
              at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4795)
              at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4748)
              at javax.swing.JComponent._paintImmediately(JComponent.java:4692)
              at javax.swing.JComponent.paintImmediately(JComponent.java:4495)
              at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)
              at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUt
      lities.java:117)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
              at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:20
      )
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

            shickeysunw Shannon Hickey (Inactive)
            mjoshisunw Mayank Joshi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: