peace_comp
12-11-2007, 06:20 AM
Peace..
hey ..well I just need to know if there is a special methode in jcomobox to test if an item already exist in the list before we add it..
I could use a sample loop to compare between each Item in the Comobox with the item i wanna add ..(if one of them return a true boolean means that it exist)..but it won't be a good idea if the list is so long ..
but is there already a methode tu use directly to get if a value (or item) exist in the combobox..???
I had this problem when I try put a columns values into a jcombobox (when a user click on a button)..but if he clicks many times the same values are repeated in the list ???
thanks
hey ..well I just need to know if there is a special methode in jcomobox to test if an item already exist in the list before we add it..
I could use a sample loop to compare between each Item in the Comobox with the item i wanna add ..(if one of them return a true boolean means that it exist)..but it won't be a good idea if the list is so long ..
but is there already a methode tu use directly to get if a value (or item) exist in the combobox..???
I had this problem when I try put a columns values into a jcombobox (when a user click on a button)..but if he clicks many times the same values are repeated in the list ???
thanks