The problem is also in the implementation

   public void paint(Object g) {
        if (isVisible()) {
                int figCount = this.figs.size();
                for (int figIndex = 0; figIndex < figCount; ++figIndex) {
                        Fig f = (Fig)this.figs.get(figIndex);
                        if (f.isVisible()) {
                                f.paint(g);
                        }
                }
        }
   }

better would be this

   public void paint(Object g) {
        if (isVisible()) {
                Iterator it = getFigs().iterator();
                while (it.hasNext()) {
                        Fig f = (Fig) it.next();
                        if (f.isVisible()) {
                                f.paint(g);
                        }
                }
        }
   }

getFigs already returns an unmodifiable copy of the fig list. If that
fig list being copied is also synchronized then we should be safe.

Bob.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to