public void setSelectionInterval (int anchor, int lead)

Selects the specified interval. Both anchor and lead indices are included. anchor doesn't have to be less than or equal to lead. This is a cover method that delegates to the method of the same name on the list's selection model.

Refer to the documentation of the selection model class being used for details on how values less than 0 are handled.

Parameters:
anchor    the first index to select
lead    the last index to select

See also:
ListSelectionModel.setSelectionInterval, DefaultListSelectionModel.setSelectionInterval, createSelectionModel, addSelectionInterval, removeSelectionInterval