Enterprise JavaBeans

Moderators: None (Apply to moderate this forum)
Number of threads: 58
Number of posts: 93

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
traffic light control system Posted by bardha on 31 May 2007 at 2:46 PM
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.
Attachment: java.rar (3993 Bytes | downloaded 370 times)
Report
Re: traffic light control system Posted by zibadian on 31 May 2007 at 8:28 PM
: 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



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.