Originally posted by John Lockheart:
Yes, I do get a nullpointer exception at the line where I try performing the setText() on the JLabel inside the mouseListener. Along with tons of other error messages which I guess are related to that one error. I created the JLabel and set the text to ("Click a player"). Added it to the frame, declared it as a private instance variable inside the class. Then inside the mouseListener I try calling the instance variable. I thought once I created the label, as long as I referenced it's name I could setText() anywhere. I want the label to say "Click a player", and then change when a player is clicked. How do I have to code it, so it will work?