From the Oracle doc on the NullPointerException:
Thrown when an application attempts to use
nullin a case where an object is required. These include:
- Calling the instance method of a
nullobject.- Accessing or modifying the field of a
nullobject.- Taking the length of
nullas if it were an array.- Accessing or modifying the slots of
nullas if it were an array.- Throwing
nullas if it were aThrowablevalue.
It is likely that you have got your reference for your image wrong, or that your image is in the wrong place in your eclipse project. You should store your images in the resources folder and check the references to the image.