I have designed a GUI which has a jTextArea. I can append text to this very easily in this class. But I would also like to append text to this from methods of other classes.
For this I make the jTextArea public and create an object of that class in the other class. Now I can write to the jTextArea while executing methods in the other classes.
But it turns out that I need a method of the class I created an object in within my GUI class as well. As I do that, StackOverflowError happens. What should I do?