A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
Image Loading, NullPointerException?
Joined: Sep 14, 2012
Sep 14, 2012 10:14:44
Hello, everyone. So, here is the basic layout of my project in Eclipse:
TestResources (This is a source folder):
Resources (Also a source folder):
So, with the following line of code from inside the BoxButton class (BoxButton extends
), I'm getting a
. What's wrong?
"gleam" is already declared as a
What am I doing wrong?
Joined: Oct 02, 2003
Sep 14, 2012 11:59:31
I am not a big fan of method chaining, for this reason - you can't tell which one is throwing the NPE.
Can you break it out into multiple calls and save each returned object? At least then you could figure out where the NPE is.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: Image Loading, NullPointerException?
Help with WSAD 4 and clearcase
How to have package names that don't begin with "src."?
Beginning locales ...
Eclipse:java files and source/build path question
Error launching JUnit
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014