I am using netbeans for mini project. I just want a graph at the output of it. So which component or what steps should I follow in order to print graph at the output.

I want to generate the graph as I am having values stored inside an array.
I am using swing. I want to use both pie and bar graph.