How to make the first 2 rows in a JavaFX listview non-selectable
问题 If I use playList.getSelectionModel().select(1) - the highlighted selection will be the second row of the playlist. If I use playList.getSelectionModel().select(-1) to have no rows selected (as suggested elsewhere on StackOverflow) the first row will be selected. Does anyone have any idea of why this is not working? I would like for the first two rows of the listview to never be eligible for selection. I am using JavaFX-8. public class AudioPlayerFXMLController implements Initializable {