public synchronized void paint(Graphics g) {
   g.setColor(Color.white);
   g.fillRect(0, 0, getBounds().width, getBounds().height);
   g.setColor(Color.blue);
   Voronoi.paint(g, drawVoronoiLines);
   g.setColor(Color.red);
   g.drawLine(XPos, 0, XPos, getBounds().height);
   if (Events != null && Arcs != null) {
     g.setColor(Color.black);
     Events.paint(g, drawCircles);
     Arcs.paint(g, XPos, drawVoronoiLines, drawBeach);
   }
   if (drawDelaunay) {
     g.setColor(Color.gray);
     Delaunay.paint(g);
   }
 }