Java examples for JavaFX:Rectangle
from Bounds JavaFX Rectangle
//package com.java2s; import static java.util.Objects.requireNonNull; import javafx.geometry.Bounds; import javafx.geometry.Rectangle2D; public class Main { public static Rectangle2D fromBounds(Bounds bounds) { requireNonNull(bounds, "bounds is null"); return new Rectangle2D(bounds.getMinX(), bounds.getMinY(), bounds.getWidth(), bounds.getHeight()); }//from w w w . j av a 2s .co m }