import java.awt.*; // Needed for window and graphics (explained in COMP1406) import javax.swing.*; // Needed for window and graphics (explained in COMP1406) // This application simulates birds flying in a window public class BirdSimulation { // This variable stores the panel that displays the birds // (This is a topic discussed in COMP1406 course) public static BirdPanel birdPanel; public static Bird[] birds; // an array to hold the birds public static void startSimulation() { while(true) { for (int i=0; i BirdPanel.WIDTH) b.x = -102; // 102 is the width of the Bird image b.currentFrame = (b.currentFrame + 1) % 8; } // Create a window, add birds, then start simulating public static void main(String args[]) { // Make some birds birds = new Bird[2500]; // an array to hold the birds for (int i=0; i