I have a JSpinner control that has random values. The values can be duplicates. For example :

> 
> { 1, 2, 9, 3, 4, 5, 9, 6, 7, 3, 2, 9 }
> 
> 
> 

If the user has selected the value 9, then how can i differentiate it from the other 9s in the JSpinner, because my program will make some calculations depending on the index of the selected 9.

**My solution is to get the index of the selected item in the JSpinner to know which one is this. Is it possible ?**