This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Your problem is that you have two variables with the same name but different scope. You have instantiated the local version in createUserInterface() but not the instance variable. Thus, the local one hides the other one. Try:
Joined: Mar 26, 2004
... that is, it hides it within the scope of the method.
Joined: Mar 03, 2005
Thanks for the reply. This still does not work.
I originally had this but changed it because: When I try this now I get a compile error of
"cannot resolve symbol: auditJTextArea = new JTextArea();"
and of course everywhere that references it.
I've retyped "new JTextArea()" a thousand times but still no joy.
I don't know about "can't resolve symbol" errors, but you ought to get an "invalid type" error, because auditJTextArea is declared as a TextArea, but you're assigning a JTextArea to it -- those are two different classes.