Unfortunately, I don't think there's any standard API support for graphing a function directly. However, it is fairly simple to write your own swing utility to plot data given to it. Create your own...