Results 1 to 2 of 2
  1. #1
    Neill is offline Member
    Join Date
    Nov 2011
    Posts
    1
    Rep Power
    0

    Default Help with ERRORS

    tryin to compile a card game project but keep getting the following errors and not sure how to fix Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at com.Game.AnimalMatch.Screen.addComponentsToPane(Sc reen.java:125)
    at com.Game.AnimalMatch.Screen.createAndShowGUI(Scree n.java:256)
    at com.Game.AnimalMatch.Screen$2.run(Screen.java:278)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectio nPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)


    any help would be sooo apreciated

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,453
    Blog Entries
    7
    Rep Power
    20

    Default Re: Help with ERRORS

    The error message says it all: an object reference is null and it was first detected at line 125 in your file Game.AnimalMatch.Screen when you wanted to call the addComponentsToPane method.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Gui with errors
    By scooter24 in forum New To Java
    Replies: 2
    Last Post: 07-04-2011, 05:29 PM
  2. Replies: 4
    Last Post: 01-04-2011, 12:36 AM
  3. Getting errors
    By Abbinormal in forum New To Java
    Replies: 5
    Last Post: 01-15-2010, 06:01 AM
  4. Errors.
    By rocky in forum New To Java
    Replies: 4
    Last Post: 04-09-2009, 08:05 AM
  5. Replies: 3
    Last Post: 03-08-2009, 01:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •