This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Urgent help needed debugging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Urgent help needed debugging" Watch "Urgent help needed debugging" New topic
Author

Urgent help needed debugging

David O Byrne
Greenhorn

Joined: Mar 10, 2008
Posts: 1
The following is what is diplayed after I compile my project and then try to run it. It will compile without any errors but when I press run this comes up.

Exception in thread "main" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:1019)
at java.awt.Container.add(Container.java:351)
at MainPage.<init>(MainPage.java:36)
at startApp.<init>(startApp.java:37)
at startApp.main(startApp.java:70)

Any help with how to fix it would be appreciated.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

David,
Welcome to JavaRanch!

Please post the code around the part that throws the error. This will help someone assist you in debugging.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Urgent help needed debugging