The Java Swing GUI that I\'m developing needs to plot a 2D graph based on the x and y coordinates generated in the program.
Is there a Swing component for that?
You should check out JFreeChart which has Swing support. Here are some samples:
http://www.jfree.org/jfreechart/samples.html