Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Custom Model For JComboBox

843806Mar 29 2008 — edited Apr 1 2008
Hi All,

I have a JComboBox, which I'm populating by a custom model (say, MyComboBoxModel, in which I'm using an ArrayList). I also have one JButton.

What I want to do is, when the button is clicked, a new string (anything random) will be appended to the existing combo box items. How can I do this?

Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 29 2008
Added on Mar 29 2008
14 comments
275 views