package supersizeaccordian; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.ScrollPane; import javafx.scene.text.Text; import javafx.stage.Stage; public class ScrollPaneTest extends Application { @Override public void start(Stage primaryStage) throws Exception { ScrollPane scrollPane = new ScrollPane(); StringBuilder sb = new StringBuilder(); for (int i=0;i<100000;i++) { sb.append("Line "+i+"\n"); } Text text = new Text(sb.toString()); scrollPane.setContent(text); Scene scene = new Scene(scrollPane,400,400); primaryStage.setScene(scene); primaryStage.show(); } }