offset JavaFX Rectangle - Java JavaFX

Java examples for JavaFX:Rectangle

Description

offset JavaFX Rectangle

Demo Code


//package com.java2s;

import javafx.scene.shape.Rectangle;

public class Main {
    static public void offsetRectangle(Rectangle r, double dx, double dy) {
        r.setX(r.getX() + dx);//ww w  .j av a  2  s.c  om
        r.setY(r.getY() + dy);
    }
}

Related Tutorials