• Post Reply Bookmark Topic Watch Topic
  • New Topic

User can add Item in JComboBox list ??  RSS feed

 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all friends,
I have developed one swing client interface on that interface i have added JComboBox,Now I want to give facility to user so that they can add more item in JComboBox list because it's my client requirement, for that I have provided one JTextField and one "Save" button on my swing client interface,Now I want that when user write more item in textfield and click on Save button that item should save in my String array list of JComboBox and user can see that item in the list of JComboBox.Can any one please guide me how I can do that.Any help will be highly appreciated.
Thanks & Regards
Bikash
[ August 28, 2003: Message edited by: Bikash Paul ]
 
VJ Silva
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look into the api for the javax.swing.DefaultComboBoxModel class. You'll need to get the model for the current JComboBox you are using, and add Elements to the model. Good luck with it.
 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have done it.Thanks for ur suggestion.
Thanks
Bikash
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!