LineSegmentCollection (cont)
public void paint(Graphics g) {
setBackground(Color.red);
for (Enumeration theEnum = theSegments.elements();
theEnum.hasMoreElements();) {
((LineSegment)theEnum.nextElement()).paint(g);
public Vector otherSegments(LineSegment oneSegment) {
Vector copyOfList = (Vector)(theSegments.clone());
copyOfList.removeElement((Object)oneSegment);