This section illustrates you how to draw different curves with the class QuadCurve2D.
The QuadCurve2D class provides a quadratic parametric curve segments. We are providing you an example which shows different curves.
In the given example, we have used Vector class to implement an array of objects. The components of this class can be accessed using an index. The method vector.size() of Vector class returns the number of components in the vector. The method vector.elementAt(k) returns the component at the specified index, in this example we have used 'k' as index.
Here is the code of QuadCurveExample.java
Output will be displayed as:
Liked it! Share this Tutorial