Using a Timer class to call it every X milliseconds, I vary between about 5-50ms per frame because the redrawing starts to lag with shorter times, but it is more accurate.
I'm not sure if the thing is meant for animation, it's just the general JFrame. Tutorials online kinda indicate it would clear itself on each call to repaint() but mine doesn't except when I resize the window :x
It does look kinda neat this way, though. Especially using multiple springs ilke that.
I'm not sure if the thing is meant for animation, it's just the general JFrame. Tutorials online kinda indicate it would clear itself on each call to repaint() but mine doesn't except when I resize the window :x
It does look kinda neat this way, though. Especially using multiple springs ilke that.

