puk -2 Light Poster

Hi,
I am using JFreechart to create a graph of some data that i have produced using a program i have written. The problem that i have is that i have to manually input the data into
the dataset to create the graph.Is it possible to generate the data that will go into the dataset without having to manually input the data? if yes can someone please explain to me how i might go about it? Thank you for your help.