Code example for JList

Methods: setSelectionMode