Moving a car
Hello dis is Amit....
i working on a small activity i.e. a car is going on road suddently the car hit the signal light pole the color of the signal light was green as the car hit the pole, the green light get disable and red light start blinking...
what i want is , i have a panel i am inserting car image on that panel.. n in the 2nd panel i am inserting the image of a pole with that m inserting two button which wud work as lights...
m dun wid all the designing part but i am unable to make the car panel moveable in the direction of pole panel..
n i want to to the same wid the help of threads only... plz suggest me the answer.
Thanks n Regards
ur new friend
Re: Moving a car
Please read the link in my signature on asking questions the smart way, especially the bit about using proper spelling and grammar. I can barely read what you're saying.
But if I understand you correctly, I think you want to take a look at the Swing.Timer class.
See also: Lesson: Performing Custom Painting (The Java™ Tutorials > Creating a GUI With JFC/Swing)