1

basically I would like to know how to to the following Java. Example... Say I have one JComboBox, and it is populated with 10 items which reads from a text file ("apple","banana","kiwi","orange","grape fruit"), and the other JComboBox holds the price ($1,$2,$4, etc etc...you get the drift).

How do I make in such a way when I select for example banana from the JCombobox that it syncs the other JCombox to the correct price?

Basically syncing the two JCombobox so that you do not need to select the price yourself - it does it automatically for you.

Thanks

Hovercraft Full Of Eels
  • 283,665
  • 25
  • 256
  • 373
NinjaLoop
  • 33
  • 8
  • 1
    This has been asked many times before, for example, please see this [duplicate question](http://stackoverflow.com/questions/3191837/dynamic-jcomboboxes) which was used to close your question. And for more similar questions/answers, please check out this [search of this site](http://stackoverflow.com/search?tab=relevance&q=%5bjava%5d%20%5bswing%5d%20jcomboboxes%20linked). In fact, this second link is the most important since it will introduce you to the search capabilities of this site and help reduce unnecessary duplicate questions. – Hovercraft Full Of Eels Jan 17 '15 at 13:41
  • Cross posted: http://www.coderanch.com/t/644863/GUI/java/JComboboxe-sync-selects-item-Dropdownlist. – camickr Jan 17 '15 at 15:41

0 Answers0