Details
-
Bug
-
Resolution: Duplicate
-
P3
-
jfx18, jfx19
-
generic
-
generic
Description
ADDITIONAL SYSTEM INFORMATION :
Checked on Windows 11 and Ubuntu 22.04
A DESCRIPTION OF THE PROBLEM :
Scrolling to the bottom using method scrollTo() on a TableView on version 19-ea+9 leaves table in wrong state - last row is at the bottom of the visible area but other rows are not rendered, so it leaves empty area above.
It looks OK on version 17.0.2 - table fills whole visible area with the last row at the bottom.
On versions 18 -> 19-e+9 last row is at the top of the visible area with empty space below, which also looks worse than on version 17.
On versions 18+ there is also an output on console:
"javafx.scene.control.skin.VirtualFlow addTrailingCells
INFO: index exceeds maxCellCount. Check size calculations for class javafx.scene.control.TableRow"
REGRESSION : Last worked in version 17.0.4
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Code attached
---------- BEGIN SOURCE ----------
public class App extends Application {
@Override
public void start(Stage stage) throws Exception {
List<String> rows = IntStream.rangeClosed(1, 1000).boxed()
.map(i -> "row-" + i)
.collect(Collectors.toList());
TableView<String> tableView = new TableView<>();
TableColumn<String, String> tc = new TableColumn<>("column-1");
tc.setCellValueFactory(p -> new ReadOnlyStringWrapper(p.getValue()));
tableView.getColumns().add(tc);
tableView.setItems(FXCollections.observableArrayList(rows));
var scene = new Scene(new StackPane(tableView), 200, 200);
stage.setScene(scene);
stage.show();
tableView.scrollTo(rows.size()-1);
}
public static void main(String[] args) {
launch();
}
}
---------- END SOURCE ----------
FREQUENCY : always
Checked on Windows 11 and Ubuntu 22.04
A DESCRIPTION OF THE PROBLEM :
Scrolling to the bottom using method scrollTo() on a TableView on version 19-ea+9 leaves table in wrong state - last row is at the bottom of the visible area but other rows are not rendered, so it leaves empty area above.
It looks OK on version 17.0.2 - table fills whole visible area with the last row at the bottom.
On versions 18 -> 19-e+9 last row is at the top of the visible area with empty space below, which also looks worse than on version 17.
On versions 18+ there is also an output on console:
"javafx.scene.control.skin.VirtualFlow addTrailingCells
INFO: index exceeds maxCellCount. Check size calculations for class javafx.scene.control.TableRow"
REGRESSION : Last worked in version 17.0.4
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Code attached
---------- BEGIN SOURCE ----------
public class App extends Application {
@Override
public void start(Stage stage) throws Exception {
List<String> rows = IntStream.rangeClosed(1, 1000).boxed()
.map(i -> "row-" + i)
.collect(Collectors.toList());
TableView<String> tableView = new TableView<>();
TableColumn<String, String> tc = new TableColumn<>("column-1");
tc.setCellValueFactory(p -> new ReadOnlyStringWrapper(p.getValue()));
tableView.getColumns().add(tc);
tableView.setItems(FXCollections.observableArrayList(rows));
var scene = new Scene(new StackPane(tableView), 200, 200);
stage.setScene(scene);
stage.show();
tableView.scrollTo(rows.size()-1);
}
public static void main(String[] args) {
launch();
}
}
---------- END SOURCE ----------
FREQUENCY : always
Attachments
Issue Links
- duplicates
-
JDK-8291908 VirtualFlow creates unneeded empty cells
- Resolved
- relates to
-
JDK-8290348 TreeTableView jumping to top
- Resolved
-
JDK-8276553 ListView scrollTo() is broken after fix for JDK-8089589
- Resolved
-
JDK-8291908 VirtualFlow creates unneeded empty cells
- Resolved