Custom Components

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.

Previous | Next | Top | Cafe au Lait

Copyright 1997, 2005 Elliotte Rusty Harold
Last Modified April 1, 2006