If I remove it then I can compile and run (and crash) but it does compile.

Is there no other way to reference the label object (or any object for that matter)?

Thanks!!

July 8th, 2010, 10:03 AM

Norm

Re: Can't set label text from a Jbutton

If you are getting compile errors, you must copy and paste them here. We're not able to see them otherwise.

July 8th, 2010, 10:17 AM

copeg

Re: Can't set label text from a Jbutton

Quote:

Originally Posted by VBGuy

Is there no other way to reference the label object (or any object for that matter)?

As far as referencing other object, you can pass reference to the class as shown above, or alternatively create an inner class (or inner anonymous class) which has access to the holding class variables (this can be useful in quite a few ways, but at times can create a mess as well)