public void paintComponents(Graphics g, boolean hilited, boolean flatten) { Enumeration e = subObjectsV.elements();  if (flatten) { Object obj; while (e.hasMoreElements()) { obj = e.nextElement(); if (obj instanceof Group) ((Group)obj).paintComponents(g, hilited, true); else ((VisibleObject)obj).paint(g, hilited); }  } else { VisibleObject vo; while (e.hasMoreElements()) { vo = (VisibleObject)(e.nextElement()); vo.paint(g, hilited); }  e = subObjectsV.elements(); while (e.hasMoreElements()) { vo = (VisibleObject)(e.nextElement()); vo.postPaint(g, hilited); } }
public void paintComponents(Graphics g, boolean hilited) { paintComponents(g, hilited, false);
public void paintComponents(Graphics g, boolean hilited, boolean flatten) {	Enumeration e = subObjectsV.elements();	if (flatten)	{		Object obj;		while (e.hasMoreElements()) {			obj = e.nextElement();			if (obj instanceof Group)				((Group)obj).paintComponents(g, hilited, true);			else				((VisibleObject)obj).paint(g, hilited);		}		// no post paint here!!!	}	else	{		VisibleObject vo;		while (e.hasMoreElements()) {			vo = (VisibleObject)(e.nextElement());			vo.paint(g, hilited);		}				e = subObjectsV.elements();		while (e.hasMoreElements()) {			vo = (VisibleObject)(e.nextElement());			vo.postPaint(g, hilited);		}	}	}