• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

swing component exception

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A "server" and a "session" are not normal parts of a Swing app... perhaps you could provide more information on what your program does.
 
angelin prema
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting this exception while updating the tree
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic