hi,
I have an application that paints a rectangle(car) and moves it across the screen using a timer when a start button is clicked.
The problem i have is i want to generate(paint) cars randomly at specific intervals (using a timer) when the cars disappear from the screen/street.
Now i cant use a paint method inside the action event (action listener of timer) and vice-versa i cant put the action event inside the paint.
So i have a vehicle class that produces a car like new rectcar(2,5,7)
I want to know where to put the code that will generate the cars randomly any ideas?