Lightweights--example
The structure of our lightweight is fairly simple:
- The constructor would takes in an image (since image loading requires a toolkit, most easily accessed from the Applet)
- The paint method just draws the image
- We include a getPreferredSize() method to tell the container the size of the component