package javaapplication35; import javafx.application.Application; import javafx.geometry.Orientation; import javafx.scene.Scene; import javafx.scene.control.ListView; import javafx.scene.shape.Rectangle; import javafx.stage.Stage; public class JavaApplication35 extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { ListView lv = new ListView(); lv.setOrientation(Orientation.VERTICAL); for (int i = 0; i < 10; i++) { lv.getItems().add(new Rectangle(50, 170)); } stage.setScene(new Scene(lv, 100, 100)); stage.show(); } }