The JFrame class (and other classes) has methods that give its current size.
Type: Posts; User: Norm
The JFrame class (and other classes) has methods that give its current size.
Sorry, I don't know what the variable z contains or what the meaning of 1200 is.
A better name for the variable would explain what data z contains.
The length of the race track should be held in a...
Where is the car when it completes a lap? Can you use its position to determine when it has completed a lap?
Where are the laps counted?
Your code is very hard to read and understand. There are no comments and the variable names are not descriptive of what data they hold. The 341 is a complete mystery and will cause problems when...
Where do you count the laps each car has made?
Where do you record the x location of each car so that you know which car is in front?
Most of the variables have poor non-descriptive names...