You can do simple animation in Java by using a [URL="http://download.oracle.com/javase/6/docs/api/javax/swing/Timer.html"]Timer[/URL] object (from the swing package, not the util package). You give it a delay (in milliseconds) and an ActionListener, and then you start the timer. After that, every time the timer goes off, the actionPerformed method in the ActionListener … Read More
I think the timer approach is simpler just to get a few cars moving around the screen. But if the UI gets complicated, there might be some lags in repainting the components. So it depends on how slick you want to get and how many objects will be moving around. Read More
Well, I have no experience with the timer approach. The game approach may be faster (ie you could have more cars), but probably harder? And you wouldn't interact much with Java UI building.
I suggest writing a tictactoe game with JPanels, get used to Java a little before doing someting … Read More
[QUOTE=shakssage;1384119]I just had a quick read through the following tutorial for tictactoe and it was very easy to understand.
I'm not new to programming as a whole and I understand how to use loops etc. I was just confused on the approach to take with regards to the traffic … Read More