• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Binding a JCombobox using a buffered model?

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,

I'm using the JGoodies Binding framework in my Swing GUI to bind bean parameters to my visual display. In particular, I've created a JCombobox that I want to bind to bean parameter. I have several other parameters already bound using binding and a buffered model (i.e. someone can type a new value in a textfield but it doesn't actually make the changes to the bean's parameters until an action is triggered, like hitting an Apply button). It may be obvious, but is there a way to do the same, ie. buffer, with a JCombobox? Right now I have the following code:



The first part (the config_tf textfield) creates a textfield buffered until the user triggers an action. But with the JCombobox I'm not sure how to do this. (the createComboBox only takes a selectionInList parameter).

Thanks for any hints.

Dave
 
David Irwin
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, I found the answer to be relatively straight forward. For everyone's benefit, I've posted the solution I found to work below:



and in my hardware object I have the following:

 
reply
    Bookmark Topic Watch Topic
  • New Topic