You have a user interface that shows a java.awt.List of named colors from which the user can select to set the background of an application. Which event is generated when one of the names is selected? The answer says Itemevent. Could anybody tell me why ItemEvent and not ActionEvent? Thankx, Lalit.
Because a List is more complicated than a Button or some other component. When you press a Button, an event is fired and that's all that you need to know. When you select an item from a list you need to know MORE that just that "something" happened. You need to know WHAT was selected. List implements the ItemSelectable interface to provide this more sophisticated functionality.
"JavaRanch, where the deer and the Certified play" - David O'Meara