SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJA
~Currently preparing for SCJP6
SCJA
~Currently preparing for SCJP6
Your SetText object creates a new GetText object, with its own new text field. You probably want to give it a reference to the existing GetText object in the constructor.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Yes. You can reference it inside your action listener using "GetText.this" - you need the "GetText" prefix because "this" refers to your action listener.
You will have to find an object to pass from the GetText class to the SetText here class.
If you are going to do it that way, why not pass a reference to the text field directly?
SCJA
~Currently preparing for SCJP6
SCJA
~Currently preparing for SCJP6
Yes, but other people have refined the answerGeoff Jefferson wrote:. . . Do you mean something like:
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |