NullPointerException received trying to change the button label
Joined: Nov 05, 2008
I'm getting a java.lang.NullPointerException error during runtime when trying to change the button text when clicking the button, eastButton (line 46). I placed a System.out.println statement and the text print with no errors, so I know the coding is correct (with the exception to the setLabel command).
This worked. I'm currently going through the Heads Up book and an example they used only displayed the buttons, but no action was attached to them. I went a step foward and added the action, but didn't realize that the JButton within the method over wrote the class button. Thanks again for your help...Doug