Lightweights--How?
Your class will have to provide the ‘look and feel’ for the component. Consider having:
One or more constructors:
If the component responds to any events, such as mouse clicks, the constructor(s) should invoke the enableEvents method.
The paint method, with your specified look.
Programmatic methods (state/behavior).
Resizing methods: If the component's size should change, then call invalidate() before repaint().
The contains() method if the component responds to events fired in only part of its drawing area
Appropriate event methods