Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
I am getting the following exception when I am running my Swing Application. But the program continues and does not terminate abruptly unlike general Exceptions
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.plaf.basic.BasicTreeUI.paintRow(BasicT reeUI.java:1399)
at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTree UI.java:1189)
at javax.swing.plaf.ComponentUI.update(ComponentUI.ja va:142)
at javax.swing.JComponent.paintComponent(JComponent.j ava:742)
at javax.swing.JComponent.paint(JComponent.java:1005)
at javax.swing.JComponent.paintWithOffscreenBuffer(JC omponent.java:4963)
at javax.swing.JComponent.paintDoubleBuffered(JCompon ent.java:4916)
at javax.swing.JComponent._paintImmediately(JComponen t.java:4859)
at javax.swing.JComponent.paintImmediately(JComponent .java:4666)
at javax.swing.RepaintManager.paintDirtyRegions(Repai ntManager.java:451)
at javax.swing.SystemEventQueueUtilities$ComponentWor kRequest.run(SystemEventQueueUtilities.java:114)
at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 461)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:110)
How do I avoid this exception. What would be the cause for such an exception