-2

I currently have two halves of a video game; a storyboard system that reads in a scene from an XML file then displays a description of the scene and a list of choices that the player interacts with, and a combat system that works in a similar way only with the players prompts coming directly from the java system and not the XML. I am having trouble putting these two things together. I have combined the code of both but, in combining two working programs I have ended up with two NullPointerExceptions coming off of a DefaultListModel that in every instance has at least one value added. I can't figure out why it's still being thrown as NULL.

I cant enter my code here because it exceeds 30000 characters so here is a link to a version control repository:

https://github.com/jpinaz92/Itc303-textAdventure/commit/59a24a677b85ec237d9270c75592e09fd43cb9e6

If some one could figure out what is causing all of these problems it would rally help me, and if there is a way to post my code here even though it is longer than 30000 characters let me know and I will do it.

Here is the full output:

java.lang.NullPointerException
    at textadventure.TextAdventureGUI2.initComponents(TextAdventureGUI2.java:199)
    at textadventure.TextAdventureGUI2.<init>(TextAdventureGUI2.java:150)
    at textadventure.TextAdventureGUI2$1.run(TextAdventureGUI2.java:107)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$500(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(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)
Exception in thread "main" java.lang.NullPointerException
    at textadventure.TextAdventureGUI2.initComponents(TextAdventureGUI2.java:199)
    at textadventure.TextAdventureGUI2.<init>(TextAdventureGUI2.java:150)
    at textadventure.TextAdventureGUI2.main(TextAdventureGUI2.java:146)
SteZer0
  • 1
  • 3
  • Please try to identify the problem. Post the stacktrace of the NullPointerExceptions and post the code the stacktrace refers to. Stackoverflow is not meant to ask people to look through a whole program for errors, but to ask people how to solve a specific problem. – Joost Verbraeken Sep 03 '16 at 08:28
  • all of these errors are caused in my implementation of the nimbus look and feel functions. I've never used nimbus before so if that's where the errors are coming from it makes sense that I wouldn't be able to see what's causing them. – SteZer0 Sep 03 '16 at 11:06

1 Answers1

0

I fixed it the issue was in the initialization the list model needed arguments.

SteZer0
  • 1
  • 3