import java.awt.*;
import java.applet.*;

public class DoubleBuffer extends Applet {
   Image bild = null;

   public void init()
   {
      if ( bild != null )
          bild.flush();
      bild = createImage ( 101, 101 );
   }

   public void start()
   {
      setBackground ( Color.white );
          
      Graphics b = bild.getGraphics();
      b.setColor( Color.blue );
      b.drawOval ( 0, 0, 100, 100 );
      b.drawOval ( 1, 1,  99,  99 );
      b.fillOval ( 20, 25, 15, 20 );
      b.fillOval ( 65, 25, 15, 20 );
      b.fillRect ( 40, 50, 20, 20 );
      b.fillArc ( 30, 80, 40, 10, 180, 360 );
   }

   public void update ( Graphics g)
   { 
      g.drawImage ( bild, 0, 0, this );
   }

   public void paint ( Graphics g )
   {
      g.drawString ( "Maustaste drcken", 5, 30 );
   }

   public boolean mouseDown ( Event e, int x, int y )
   {
      repaint();
      return true;
   }	
  
}
