public TrafficLight() { color = Color.Green; toNextLight = new Timer(new FromGreenToYellow(this), 6.0f); } class FromGreenToYellow : Event