package webviewtest2; import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.scene.paint.ImagePattern; import javafx.scene.shape.Rectangle; import javafx.stage.Stage; public class LargeImagePatternTest extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { Image image = new Image("file:test.png"); ImagePattern imagePattern = new ImagePattern( image, 0, 128, 1, 10240, false); Rectangle rectangle = new Rectangle(100, 100, 300, 300); rectangle.setFill(imagePattern); Group root = new Group(); root.getChildren().add(rectangle); stage.setScene(new Scene(root)); stage.sizeToScene(); stage.show(); } }