getting a nullPointerException when using getClass or getImage in init() method