Your painting looks questionable:
- You're calling
paint(...)
directly, something that should never be done. - You're not calling the
super.paint(...)
method inside of your paint override. - Try minimizing your GUI and then restoring it, and tell me how much of your drawing disappears into the nothingness.
Instead you should:
- call
repaint()
when you want to suggest that the GUI be painted - call the super method in your painting override
- create a collection of ovals, perhaps Ellipse2D, and paint them in your painting method via a for loop.
- Chuck all this AWT code and instead draw in Swing in a JPanel's
paintComponent(...)
method. - Rather than draw individual ellipses, draw lines connecting points. You can change thickness by changing the Stroke.
- Save each curve drawn onto a BufferedImage which is then drawn in the paintComponent method.
Edit:
For a complete example, please see my answer here: Changing JPanel Graphics g color drawing line