For debugging purposes add a println that prints out the path to the image before using it to get the image. Look at the print outs and make sure that the path is correct.