Adding JTextField that has to listen to updates
I have to modify an existing application and add a field that should constantly show a value that is calculated and not shown in many places in the existing code.
As I am new to this I added a JTextField and set its value to the initial value. That worked.
Now in most of the places this value is calculated I do not have direct access to that JTextField. I do not want to add a global variable as I am afraid to destablize the code. Moreover, in the few places I do have access to it, I tried calling setText but the field would not refresh with the new value.
I am sure I am missing something very basic here regarding the mechanics of this. Should I fire an event ? which/how ? a reference to an example would be highly appreciated.
Thanks for any thought.

