package fixedcellheight; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.ListView; import javafx.scene.control.Slider; import javafx.scene.layout.VBox; import javafx.stage.Stage; public class FixedCellheight extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { ListView lv = new ListView(); lv.getItems().addAll(1, 2, 3); Slider s = new Slider(); s.setMin(-1); s.setMax(100); s.setMajorTickUnit(1); s.setSnapToTicks(true); s.setShowTickLabels(true); s.setShowTickMarks(true); s.valueProperty().bindBidirectional(lv.fixedCellSizeProperty()); Scene scene = new Scene(new VBox(lv, s), 300, 500); stage.setScene(scene); stage.show(); } }