is JavaFX Rectangle Size Too Small - Java JavaFX

Java examples for JavaFX:Rectangle

Description

is JavaFX Rectangle Size Too Small

Demo Code


//package com.java2s;

import javafx.geometry.Point2D;

public class Main {
    public static boolean isRectangleSizeTooSmall(Point2D start, Point2D end) {
        double width = Math.abs(end.getX() - start.getX());
        double height = Math.abs(end.getY() - start.getY());
        return width < 10 || height < 10;
    }//from w  w w.java  2  s .  c om
}

Related Tutorials