build JavaFX Circle - Java javafx.scene.shape

Java examples for javafx.scene.shape:Circle

Description

build JavaFX Circle

Demo Code


//package com.java2s;

import javafx.scene.shape.Circle;

public class Main {
    public static void main(String[] argv) throws Exception {
        double cx = 2.45678;
        double cy = 2.45678;
        double r = 2.45678;
        System.out.println(buildCircle(cx, cy, r));
    }//from  w w w. j a  v  a 2 s . c o m

    /**
     *
     * @param cx
     * @param cy
     * @param r
     * @return
     */
    public static Circle buildCircle(double cx, double cy, double r) {
        Circle circle = new Circle();
        circle.setCenterX(cx);
        circle.setCenterY(cy);
        circle.setRadius(r);
        return circle;
    }
}

Related Tutorials