Lightweights--a heavyweight for comparison purposes
import java.awt.*;
class hwc extends Canvas{
Image im;
public hwc (Image im){
this.im = im;
}
public void paint (Graphics g) {
g.drawImage (im, 0, 0, this);
}
public Dimension getPreferredSize(){
return new Dimension (im.getWidth(this),
im.getHeight(this));
}
}
Previous slide
Next slide
Back to first slide
View graphic version