Flocking by Jim White

 

Move the cursor into the applet area and the boids will chase it. Move it out of the applet area and one of the boids becomes "it" and gets chased. There are a zillion options for this thing including graphics. The source is Flocklet.java.