public void draw(int initialOffset, Graphics g) {
   int offset = initialOffset;
   for (int i = 0; i < this.components.size(); i++) {
     CanvasComponent c = (CanvasComponent) components.elementAt(i);
     c.draw(offset, g);
     offset = c.getDescent();
     g.setColor(Graphics.getColorOfName(Graphics.SILVER));
   }
   this.descent = offset;
   this.height = this.descent - initialOffset;
 }
Ejemplo n.º 2
0
 public void paint(Graphics g) {
   g.drawImageReference(image, x, y, true);
 }