I was writing a small application and when I tried to create an ImageIcon I always got an exception. The exception was caused by this line of code:
prayerLev
I believe the NPE is being thrown from the ImageIcon constructor as getResource is returning null.
ImageIcon
getResource
null
Try the following:
getClass().getClassLoader().getResource("/icons/icon_prayer.png")
Or:
ClassLoader.getSystemResource("/icons/icon_prayer.png")