ActionListener Usage

[FONT=Verdana][SIZE=4]How do I properly use a ActionListener in JAVA to have a trafficlight be able to turn each light on and off?[/SIZE][/FONT]

               [FONT=Verdana][SIZE=4]I have a homework assignment that I need to make a traffic light that is turned on using buttons. I have everything done except linking the buttons to the lights. Any help would be great. Thanks.[/SIZE][/FONT]

Okay, I’ve got the buttons working, but its not too effective, I have four buttons, red, yellow, green, and a ‘test’ button which turns all the lights on. Is there a way to use a listener for multiple buttons, because the one i am using now really is only good for 2 buttons as opposed to 4.