List
EventsList
fires an ItemEvent
. However, when the user double clicks on a list item,
the List
fires an ActionEvent
. Therefore, you can register both an ItemListener
to process selections and/or an ActionListener
to process double clicks.
public void addItemListener(ItemListener l)
public void removeItemListener(ItemListener l)
public void addActionListener(ActionListener l)
public void removeActionListener(ActionListener l)
The action command in the ActionEvent
is the list item which was double clicked.