This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
    Bookmark Topic Watch Topic
  • New Topic

Adding Items to Jlist using JComboBox. Problem with avoiding duplicates.

 
rayan alex
Ranch Hand
Posts: 33
1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,

In the following program, Im trying to add some items to Jlist using JComboBox without any duplicates.
I managed to add items with Duplicates, As well as I managed to find duplicates using this condition (combo.getSelectedItem().equals(listModel.getElementAt(i)) )
But when i add else statement, program didnt wiork. Please help me to understand where is the error of this program,
Thank you in advance.

 
Campbell Ritchie
Sheriff
Posts: 48642
56
  • Mark post as helpful
  • send pies
  • Report post to moderator
Closing as a duplicate of the question in this thread.
 
    Bookmark Topic Watch Topic
  • New Topic