Just wondered if someone could kindly spare a few minutes to help me (a beginner of JAVA) by checking the attached applet and
(1) see why the text box (TextField) entries are not read by the code in this traffic light simulation. The variables assigned to the six text boxes are var1,var2,...,var6.
(2) Also, the applet is extremely slow to run and how can I improve that please?
What I am trying to do is to read the input from text boxes as the traffic volumes in each direction (say 25 cars) and then set the timing for each direction's GREEN light accordingly. In case you would need, th variable named STATE (changing as 10,15,20,25,..) defines the current state of the traffic light sequence, i.e. which roads get GREEN.
Many thanks in advance.
This topic has been locked.
Pinned topic Code does not read from text box in applet and the applet is slow
Answered question This question has been answered.
Unanswered question This question has not been answered yet.