public void paint(Graphics g) { g.setColor(getForeground()); g.setPaintMode(); for (Enumeration e = lines.elements(); e.hasMoreElements(); ) { CanvasLine l = (CanvasLine) e.nextElement(); l.draw(g); } }
public void createLine(Vector coords, CanvasProp prop) { CanvasLine l = new CanvasLine(this); l.coords = coords; l.prop = prop; lines.addElement(l); }