Java examples for JavaFX:Layout
set JavaFX Pane Clip
//package com.java2s; import javafx.beans.binding.ObjectBinding; import javafx.scene.Node; import javafx.scene.layout.Pane; import javafx.scene.shape.Rectangle; public class Main { public static void setPaneClip(final Pane container) { container.clipProperty().bind(new ObjectBinding<Node>() { {/*ww w. ja va 2 s . c o m*/ bind(container.widthProperty(), container.heightProperty()); } @Override protected Node computeValue() { return new Rectangle(container.getWidth(), container .getHeight()); } }); } }