Lots of ideas for the OP to think about.
I wrote it with a Timer for each ball. Fairly simple approach. No difficult logic.
I'll look at changing it to use a single timer and see how that goes.
Type: Posts; User: Norm
Lots of ideas for the OP to think about.
I wrote it with a Timer for each ball. Fairly simple approach. No difficult logic.
I'll look at changing it to use a single timer and see how that goes.
@Kevin - What if you want the balls to move at different speeds? Could that be done by having different changes to the x and y. Would that be jerky?
I'd create a Ball class that would paint itself at its location with a timer thread to move it and give it a starting point using a Random number.