I'm wondering there is a nice open-source or public domain set of examples or classes showing how to make 2D graphs. I want to have a graph of a function in a window with some interactivity--the user should be able to move a marker from left to right across the graph, and then the program will display the value of the function at that point.
Craig, thanks for the code sample. Probably could find others with a little searching, but yours is here. My son is just starting a CompSci degree and has just started a Java class and a Calculus class. Your code may be interesting to him.