Rectangle with Round Corners Example

Rectangle is a shape with the four corners. You have to specify the width and height of rectangle to draw it in your javafx application. If you are interest the make it’s corner rounded you have to call the methods setArcWidth();  and setArcHeight(); . Rounded corners only will be affected if and only if both methods have the value greater than 0.0.

Here is the output of the above program.