Bind variable value to a Swing component
843804Dec 16 2004 — edited Dec 16 2004I'm totally lost in this one. I've been reading Swing tutorials and books and cant figure it out.
I have an array of objects and their value is constantly changing as the program runs. What I want is their value reflected inside some Swing componentes. Let's say a bunch of JTextFields and on each one I want to display the value of the objects inside the array and when some of the objects value change, that change is reflected in the value displayed in the corresponding JTextField. Of course the JTextFields could be changed to lets say a JTable. Also the code responsable for changing the displayed value must be independent of the code that change the value of the objects (so the GUI part is independent of the main program)
Can this be done somehow?? if so, could someone point me in the right direction, maybe with some tutorial/book/url ???
Thanks a lot, and if something makes no sense, I'll try to explain better.