Hi, I'm unable to add a value to a JComboBox using the additem().I receive an error that this methos has caused an error in this Mutable_model. Please reply as soon as possible. Happy Middling with java. Bye from Netharam.
posted 14 years ago
Hi, netharam, I had the same problem before. What I did is to put all data in the Vector(you may use array) and call yourCB.setModel(new DefaultComboBoxModel(YourVector)); YourCB.validate(); It works, but I think it's not a good idea because everytime one data changes, my comboBox has to changes its model. Please let me know when you have a better solution, Thanks! Good luck!