Нет никакого неявного броска, потому что перечисление не должно использовать интервал в качестве базового типа. Если Ваше перечисление использовало uint в качестве базового типа, например, нет никакого неявного броска от uint до интервала
This should do it:
dataList.ensureIndexIsVisible(dataList.getSelectedIndex());
Or, if multi-selection is enabled :
dataList.scrollRectToVisible(
dataList.getCellBounds(
dataList.getMinSelectionIndex(),
dataList.getMaxSelectionIndex()
)
);
You can use the ensureIndexIsVisible
method
http://java.sun.com/javase/6/docs/api/javax/swing/JList.html#ensureIndexIsVisible(int)
Scrolls the list within an enclosing viewport to make the specified cell completely visible. This calls scrollRectToVisible with the bounds of the specified cell. For this method to work, the JList must be within a JViewport.