Java examples for JavaFX:Rectangle
center JavaFX Bounds
//package com.java2s; import javafx.geometry.Bounds; import javafx.geometry.Point2D; public class Main { public static Point2D center(Bounds bounds) { return new Point2D(bounds.getMinX() + bounds.getWidth() / 2, bounds.getMinY() + bounds.getHeight() / 2); }/*from w ww. j a v a 2 s . c om*/ }