The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 2 of 2

Thread: ActionListener Usage.

  1. #1

    ActionListener Usage.

    How do I properly use a ActionListener in JAVA to have a trafficlight be able to turn each light on and off?

    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.

  2. #2
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012