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; }
public void paint(Graphics g) { g.drawImageReference(image, x, y, true); }