Introductory lecture (Sep 12)

In class we created a simple example of an interactive graphics program using the Java AWT library. You can download the latest version of the Java AWT library from http://java.com/en/download.

Your assignment is to make your own cool little interactive graphics animation - before next Tuesday's class.

By the way, to learn how to load a audio sound file (I used that capability in the sheep-herding game I showed in class) you can look at this simple example applet:

http://mrl.nyu.edu/~perlin/audio-example
Also, if you want to draw or fill a polygon in java.awt, you need to create two arrays - one for the polygon's X coordinates and one for its Y coordinates. For example, this code draws a red triangle with a black outline:
   int X[] = {100, 200, 300};
   int Y[] = {300, 200, 300};

   ...

   g.setColor(Color.red);
   g.fillPolygon(X, Y, 3);

   g.setColor(Color.black);
   g.drawPolygon(X, Y, 3);