JPanel-Graph is a project mainly written in Java, it's free.
This Graph class will create a JPanel and draw given points and equations while providing interactive viewing of the graph.