Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Bind variable value to a Swing component

843804Dec 16 2004 — edited Dec 16 2004
I'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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 13 2005
Added on Dec 16 2004
19 comments
658 views