Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Java - Keep getting NullPointerExemption
#7
Dusk Wrote:Is LevelSkill initialized?

Yes. I did not included that in my code because it crashes before it even gets to that point. It crashes at the 1st line of the loop

EDIT: I noticed my problem. After I added in that line that @Locked pointed out I was missing, the crash log moved down one line from the "SkillLabels[skill][1] = new JLabel(" line to the "SkillDatabase.Skills[1].getName());"

I had not relized it at the time, but I do not assign a name value to skill one until about 50 lines later. I pushed that segment to the top and boom, works fine. Thanks alot to everyone who helped me through my newby-struggles
Reply


Messages In This Thread
Java - Keep getting NullPointerExemption - by Yugidude - 2013-02-24, 10:00 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)