I believe the NPE is your equals method. Does that method have a prayer of returning a boolean? If so, where does the boolean come from? Sorry to be dense (if I am), but it just doesn't look right.
Learning Java using Eclipse on OpenSUSE 11.2
Linux user#: 501795
Joined: Sep 01, 2011
Thank you so much for you replies, it is working now! It was a newbish error, sorry for that.
I guess I was expecting it to always compare against the Entry objects, as I was only putting objects of that kind into the JComboBox, but I was wrong.
Perhaps a little explanation of when the object being compared to is not an instance of Entry would be in place?
Joined: Oct 24, 2010
Darryl Burke wrote:That's what you get for not doing a null or instanceof check.
If the isntanceof is true, does one need the (Entry) cast? I'll check it later when I get home. (Note to self.)