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.
Renee Zhang
Ranch Hand
Joined: Sep 10, 2001
Posts: 72
posted
0
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!
subject: adding values to a JComboBox at runtime[urgent]