: I am doing a traffic light controller program in java.
: I have done the part of cycling the lights of traffic.Now i want to
: implement the part with the detectors and pedestrian requests but i
: don't know how to get the event of preesing a button in java.
:
: I have attached the code done modificated till now.If anybody has
: time to see it,please give me any idea of implementing detectors.
:
Detecting keypresses is done using the KeyListener interface. For more info see:
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/event/KeyListener.html