Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get this weird warning when I scroll to the end of a ListView in JavaFX?

list.getSelectionModel().select(game_ptr);
list.scrollTo(game_ptr);

When this code is run, I get the following warning:

com.sun.javafx.scene.control.skin.VirtualFlow addTrailingCells
INFO: index exceeds maxCellCount. Check size calculations for class com.sun.javafx.scene.control.skin.ListViewSkin$2

Now, the index in game_ptr is correct. This is tested. If I run the following code, there is no warning:

list.getSelectionModel().select(game_ptr);
//list.scrollTo(game_ptr);
like image 430
javachessgui Avatar asked Oct 20 '22 10:10

javachessgui


1 Answers

I know it's a little bit late, but maybe It'll help someone.

In my case I had to set the Column Resize Policy to unconstrained-resize, that worked for me.

like image 193
J. S. Avatar answered Oct 22 '22 00:10

J. S.