Class TrafficLight

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----TrafficLight

public class TrafficLight
extends Canvas
implements Runnable

Method Index

 o getMinimumSize()
 o getOnLight()
Setters and getters
 o getPreferredSize()
 o paint(Graphics)
Paint
 o run()
run method as required by Runnable interface
 o setColor(Color)
 o setOnLight(Color)

Methods

 o getOnLight
 public Color getOnLight()
Setters and getters

 o setOnLight
 public void setOnLight(Color c)
 o setColor
 public void setColor(Color c)
 o paint
 public void paint(Graphics g)
Paint

Overrides:
paint in class Canvas
 o run
 public void run()
run method as required by Runnable interface

 o getMinimumSize
 public Dimension getMinimumSize()
Overrides:
getMinimumSize in class Component
 o getPreferredSize
 public Dimension getPreferredSize()
Overrides:
getPreferredSize in class Component