You can use "String" to show the symbol on the screen:define Strings(stored alphabet characters) to represent your car. --> Call java native function to draw string at x,y position.

You also need to define variables for velocity. And change x,y coordinate according to velocity.
If you want to stop a car, apply an acceleration to change the velocity( which will change the position, i.e. make car stop). This is the physics part (High school physics).

You can read java tutorial (from sun's web site) to learn how to create simulation if you want to write code by yourself.
You can also download EJS from our server which will make job easier. (You can modified my traffic-light ejs code to get what you want.