build JavaFX Line - Java javafx.scene.shape

Java examples for javafx.scene.shape:Line

Description

build JavaFX Line

Demo Code


//package com.java2s;

import javafx.scene.shape.Line;

public class Main {


    /**/*from  www .  j a v  a 2  s .  c  o m*/
     *
     * @param sx
     * @param sy
     * @param ex
     * @param ey
     * @return
     */
    public static Line buildLine(double sx, double sy, double ex, double ey) {
        Line line = new Line();
        line.setStartX(sx);
        line.setStartY(sy);
        line.setEndX(ex);
        line.setEndY(ey);
        return line;
    }
}

Related Tutorials