In general, Rectangles can be defined as the geometrical figure consists of four sides, out of which, the opposite sides are always equal and the angle between the two adjacent sides is 90 degree. A Rectangle with four equal sides is called square.
JavaFX library allows the developers to create a rectangle by instantiating javafx.scene.shape.Rectangle class.
Rounded Corner Rectangle
We can make the corners of the rectangle round by just calling the instance setter methods setArcHeight() and setArcWidth(). It sets the height and width of the arc at the corners of Rectangle. The following example implements Rounded corner rectangle.