aspose file tools*
The moose likes Applets and the fly likes AWT-EventQueue-5!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "AWT-EventQueue-5!!!" Watch "AWT-EventQueue-5!!!" New topic
Author

AWT-EventQueue-5!!!

Sonal Sharma
Ranch Hand

Joined: May 13, 2006
Posts: 62
Dear all,
I am having a program that is creating this stack trace.Please help me out.
Thanks

My program is as following:

Exception in thread "AWT-EventQueue-5" java.lang.NullPointerException: String is null
at sun.java2d.SunGraphics2D.drawString(Unknown Source)
at AgentCallStatusApps.paint(AgentCallStatusApps.java:250)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
[ July 05, 2007: Message edited by: Ulf Dittmer ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42625
    
  65
In which line does the exception occur? What is the value of the string you're trying to draw in that line?

}catch(Exception e){}
}catch (IOException e){ }
}catch (Exception e){ }

Ignoring exceptions is not generally a good idea, and definitely not here. You should put in place some proper error handling.

Note that I have added CODE tags around your code - they make reading it much easier. See UseCodeTags for more information.
[ July 05, 2007: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AWT-EventQueue-5!!!