posted 17 years ago
i realised where the problem was lying. i found out that when the button is clicked to call the "pickNumber" function, a new instance of the array to be passed to the "pickNumber" function is created so the element that i remove from the vector does goes away but a new but the same element are added to vector. To solve this, i created a new function that accepts a vector, then a randomly element is remove from that vector. in the actionPerform method i set a counter, when the counter is zero it should call the pickNumber other wise it should call the second function i created which accepts the vector created in the pickNumber funtion. To really explain the english, here is the code
This is not smart enough for me if you think there is a better way of doing this please advice
[ July 28, 2006: Message edited by: Henry Addo ]
[ July 28, 2006: Message edited by: Henry Addo ]
[ July 28, 2006: Message edited by: Henry Addo ]