piou
asked on
awt.List ItemEvent source...
This is for the awt.List:
I want to do things accodring to which item(s) is selected in a List. So I want to mark the selected items in a simple way, and then use that info when a button is pressed for example.
The ItemListener though that I put, receives ItemEvent-s coming from the List itself, not the items in the list. The only way I can see the actual items of the list, is the ItemEvent.paramString(), which is far from useful.
Is there a reasonable way to do it?? (To get the index number of the list item selected/pressed)
I want to do things accodring to which item(s) is selected in a List. So I want to mark the selected items in a simple way, and then use that info when a button is pressed for example.
The ItemListener though that I put, receives ItemEvent-s coming from the List itself, not the items in the list. The only way I can see the actual items of the list, is the ItemEvent.paramString(), which is far from useful.
Is there a reasonable way to do it?? (To get the index number of the list item selected/pressed)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The ItemEvent also contains details about the event.
ASKER
Damn I'm bad! Damn you're good! :) Why didn't I care to look at the List methods??? :)
Javadoc is your friend :-)