I need to have a parallel function running all the time in my program.
I don’t know if I am thinking correct, but what I want to do is to have a piece of code updating my TextArea all the time, getting information from a server.
I am using RMI, just you to know.
Can I create a thread function, within MainClass, and let it run all the time?
Or how can I create a thread to update my TextArea in another class? How do I share my TextArea?
Not sure if I am understanding, I will assume TextArea means a JTextArea and MainClass is the application’s entry point.
What prevents you from doing it like this?
And in your “MainClass” something like this: