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)