It's often useful to create new subclasses of Component with
particular behavior. For example, you might want a button that's
round instead of a rectangle. The most common way to do this is to
subclass java.awt.Canvas
.
You would need to provide a paint()
method for your component.