wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes swing component exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "swing component exception" Watch "swing component exception" New topic

swing component exception

angelin prema

Joined: Jun 11, 2007
Posts: 25
Hi All,
I have started the server and logged in with two client for the same server.
when I used to kill the session of another client from the first client,
my session of the client expired well,but I got swing component exception.
Exception is produced below....
2007-07-06 12:36:58,370 WARN [System.err] Exception in thread "AWT-EventQueue-0"
2007-07-06 12:36:58,370 WARN [System.err] java.lang.NullPointerException
2007-07-06 12:36:58,371 WARN [System.err] at javax.swing.plaf.basic.BasicTreeUI.paintRow(BasicTreeUI.java:1413)
2007-07-06 12:36:58,371 WARN [System.err] at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1203)
2007-07-06 12:36:58,371 WARN [System.err] at javax.swing.plaf.metal.MetalTreeUI.paint(MetalTreeUI.java:152)
2007-07-06 12:36:58,371 WARN [System.err] at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
2007-07-06 12:36:58,371 WARN [System.err] at javax.swing.JComponent.paintComponent(JComponent.java:742)
2007-07-06 12:36:58,371 WARN [System.err] at javax.swing.JComponent.paint(JComponent.java:1005)
2007-07-06 12:36:58,371 WARN [System.err] at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
2007-07-06 12:36:58,371 WARN [System.err] at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
2007-07-06 12:36:58,371 WARN [System.err] at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
2007-07-06 12:36:58,371 WARN [System.err] at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
2007-07-06 12:36:58,371 WARN [System.err] at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
2007-07-06 12:36:58,371 WARN [System.err] at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
2007-07-06 12:36:58,372 WARN [System.err] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
2007-07-06 12:36:58,372 WARN [System.err] at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
2007-07-06 12:36:58,372 WARN [System.err] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
2007-07-06 12:36:58,372 WARN [System.err] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
2007-07-06 12:36:58,372 WARN [System.err] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
2007-07-06 12:36:58,372 WARN [System.err] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
2007-07-06 12:36:58,372 WARN [System.err] at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Can anyone reply me the solution
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

A "server" and a "session" are not normal parts of a Swing app... perhaps you could provide more information on what your program does.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
angelin prema

Joined: Jun 11, 2007
Posts: 25
I am getting this exception while updating the tree
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

"updating the tree" can mean many things...

Are you manipulating the tree model by adding or removing nodes?

I could see this maybe causing a null pointer if you were updating the model outside of the event thread while the program was attempting to paint your tree... and suddenly trying to paint nodes that no longer exist.

Are you simply interacting with the tree by selecting, opening and closing nodes?

I could this maybe causing a null pointer if you have a custom tree node renderer and some bad data in some of your nodes - when you open them and try to paint them the first time, the bad data causes a null pointer exception while rendering.
I agree. Here's the link: http://aspose.com/file-tools
subject: swing component exception