import java.applet.*; import java.awt.*; import java.awt.event.*; import java.awt.geom.*; import java.awt.image.*; import java.io.*; import java.lang.reflect.*; import java.net.*; import java.util.ArrayList; import java.util.Calendar; import javax.swing.*; import javax.imageio.*; //import javax.swing.event.*; //import java.util.*; public class Driver extends Frame { public static Driver frame2; public static Graphics2D buffer; public static BufferStrategy bs; public static int screenX,screenY; public static Timer realStart; public BufferedImage img,storedImage; public int[] rowNums,colNums; public Rectangle graph1,graph2; public double ratX,ratY; public boolean loading = true; public int years = 0; public int c1[] = new int[1000]; public int c2[] = new int[1000]; public int l = 0; public double k1[] = new double[1000]; public double k2[] = new double[1000]; public double i1[] = new double[50]; public double i2[] = new double[50]; public double i3[] = new double[50]; public double i4[] = new double[50]; public double o1[] = new double[50]; public double o2[] = new double[50]; public double o3[] = new double[50]; public double o4[] = new double[50]; public static void main(String[] args) throws Exception { frame2 = new Driver(); setUpFrame(frame2); } public static void setUpFrame(Driver d) { Part of drawing the environment } public static void makeBuffer() { Part of drawing the environment } public static void destroyBuffer() { Part of drawing the environment } public boolean isFocusTraversable() { //so keylistener will work return true; } public void paintComponent(Graphics g) { g.drawImage(img, 0, 0, null); } public Driver() { Main part of drawing the environment } public void setUpImage() { Sets up image. } public BufferedImage loadImage(String s) { Loads image } public void us() { Calculates, reads, and helps display the us population data } public void in() { Calculates and reads domestic immigration data to be factored into population data } public void out() { Calculates and reads domestic outmigration data to be factored into population data } public int[] getPixelsInRow(BufferedImage g) { Gets the pixels in row. } public int[] getPixelsInColumn(BufferedImage g) { Gets the pixels in column } private class Keyer extends KeyAdapter { Checks esc key } public static void doPause(int iTimeInSeconds) { Pause for a number of seconds } public void drawDots() { Draws multiple dots } public void drawDot(int x) { Draws a dot for each state/country } public void write(String filename, int x) { Writes to the out.txt file } public void rename() { Renames files. } public void delete() { Deletes files with multiple conditions } private class RunTimer implements ActionListener { public void actionPerformed(ActionEvent e) { Running environment } } }