Lightweights--example
import java.awt.*;
import java.awt.event.*;
class lwc extends Component{
Image im;
public lwc (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