• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JGoodies Data Binding with Lists

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is my first-ever post in this forum so firstly I just wanted to say hi all.

I am relatively new to programming and I am self-teaching myself Java (so far I have only read and done all the exercises of the book "Head First Java" and I have read a few articles on the internet when I needed something more specific). My question is probably quite simple but I think it will be beyond pure basics so I decided to post it here rather than on the beginners forum. I hope it's ok.

Basically, I'm trying to build a simple GUI whereby I display some live stock exchange prices. For that, I create a GUI and a client object that I run through a thread and runs a while loop continuously so as to query the server for changes in prices. For doing this, I have read a series of articles on the internet on using JGoodies for data binding, which allows the stock price values to update themselves in the gui as soon as the server sends a change event. However, this is relatively easy to do for a single price but not for an array of prices. When my client handles an array of prices, after some reading, I believe the only way of passing an array using JGoodies from the client object to the gui object is by using a list but I don't know what PropertChangeListeners and getValue()/setValue() methods I should use in the client object for the ValueModel to work in the gui object and effectively bind the two together?

All the generic examples I have found create the List and then bind it within the same object so no need to bind it so I was wondering how do you bind a list in one object to a different object with a simple gui?

(Please refer to the code in the binding article under "Lists Stuff" here. I am basically looking for a similar very simple example with the minimum code possible, just what is necessary to illustrate how to do this)

If by any chance I have missed a simpler method to bind an array from another object to an element in the gui via JGoodies or a different package, all code examples/proposals are welcome.

Thanks a lot for your help in advance.
 
reply
    Bookmark Topic Watch Topic
  • New Topic