table.getSelectionModel().select( 0 );
table.getItems().add( 0, item );
Selected row goes from 0 to 2 instead of 0 to 1 as expected. Also, when monitoring the tablerow focusedProperty, it goes from 0 to 3 and leaves a blue border around row 3.
Work around is to save selected index, clear selection, add, the select the desired index.
More detail here: http://stackoverflow.com/questions/25559022/javafx-tableview-tablerow-focus-behaves-strangely
table.getItems().add( 0, item );
Selected row goes from 0 to 2 instead of 0 to 1 as expected. Also, when monitoring the tablerow focusedProperty, it goes from 0 to 3 and leaves a blue border around row 3.
Work around is to save selected index, clear selection, add, the select the desired index.
More detail here: http://stackoverflow.com/questions/25559022/javafx-tableview-tablerow-focus-behaves-strangely