Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-28-2008, 03:00 PM
Member
 
Join Date: Dec 2007
Posts: 18
hemanthjava is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-28-2008, 03:13 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
At line 1399, you try to call a method of a null object. Check that line and test the objects there for nullness (e.g. if (myObj == null) {print("myObj is null");}. Once you find which object is null, try to fix that bug by analyzing why it is null and how you can solve ..
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 01-28-2008, 03:48 PM
Member
 
Join Date: Dec 2007
Posts: 18
hemanthjava is on a distinguished road
Quote:
Originally Posted by JavaBean View Post
At line 1399, you try to call a method of a null object. Check that line and test the objects there for nullness (e.g. if (myObj == null) {print("myObj is null");}. Once you find which object is null, try to fix that bug by analyzing why it is null and how you can solve ..
Hello JavaBean,
But the class on which the method is invoked which results in a NullPointer is a Java Built-in Class. Hence I am not able to debug through the classes. When I do so I get lost in the never ending series of step walk-throughs
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 01-29-2008, 03:37 AM
Senior Member
 
Join Date: Jul 2007
Posts: 1,266
hardwired is on a distinguished road
Looks like the jvm tried to draw your JTree and found some null/corrupt data in the model. Check your tree model data.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: satishkumar_lskin AWT / Swing 0 01-10-2008 03:55 PM
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException leonard New To Java 1 08-06-2007 08:04 PM
Exception in thread "main" java.lang.NoClassesDefFoundError tommy New To Java 1 07-31-2007 03:54 PM
Error: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException romina New To Java 1 07-26-2007 12:55 AM
ArrayList: Exception in thread "main" java.lang.NullPointerException susan New To Java 1 07-16-2007 08:32 AM


All times are GMT +3. The time now is 03:18 PM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org