Hi ,
I have two classes A and B.
Class B has a dialog and textArea. I want to update textarea content using settext() method from class A
What is the way to do this?
--ND
Printable View
Hi ,
I have two classes A and B.
Class B has a dialog and textArea. I want to update textarea content using settext() method from class A
What is the way to do this?
--ND
You could do this by making the JTextArea (I assume you're using Swing -- you don't specify), but I don't recommend this. Better to only expose the functionality you need. Give the class that holds the JTextArea public methods that do this, for e.g., a setTextAreaText(String text) method and/or an appendToTextArea(String text) method.