Using Canvases to Create Custom Components:
A Traffic Light Example
A
class
TrafficLight
that extends Canvas to get a custom component. A
driver
that demonstrates how it works.
This is the
window frame that it produces
.