• 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

combobox value is not changing

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

I am using a combobox in an applet. The problem I am facing is that the value of combobox overwrites the old value, if I choose the new value from the drop down list of combobox. In other words, on choosing the new value, the new value overwrites on the old value and one can see a mix of old and new value. any idea, why is this happening ?

this is the list I am attaching to combobox

final String[] modelID = {
"model1",
"model2",
"model3",
"model4"
};

this is the combobox declaration

JComboBox comboBox;

and this is the combobox initilization with the modelID as parameter

comboBox = new JComboBox(modelID);

I have already tried loading the combobox with the loop. but the result is the same. need your help.. Thnx in advance.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post an SSCCE that shows this behavior?
 
Paul Wagner
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Problem : The new value selected from drop down list of combobox overwrites the old value. One can see both old value and new selected value, with the new value overwriting the old one.

 
reply
    Bookmark Topic Watch Topic
  • New Topic