Win a copy of Spring Boot in Practice this week in the Spring forum!
  • 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
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

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: 43028
76
  • 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.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic