private static void setInitControlStates() throws FileNotFoundException {
        flashingLEDs = new ArrayList<JLabel>(); // Holds which leds are flashing
        
        // Collect previous state information.
		Scanner s = new Scanner(new BufferedReader(new FileReader("controls.txt")));
		
		// Get control states from text file
		String[] ledStates = s.nextLine().split(" ");
		String[] gaugeStates = s.nextLine().split(" ");
		String[] switchStates = s.nextLine().split(" ");
		String[] buttonStates = s.nextLine().split(" ");

		s.close();
		
		// Display states in GUI
		/*
		 * LEDs
		 */
		for (int i=0; i<3; i++) {
			for (int j=0; j<12; j++) {
				// Get the current state from controls.txt
				int curState = Integer.parseInt(ledStates[i*12 + j]);
				
				// Set LED to on, off, or flashing.
				turnLED(i, j, curState);
			}
		}
		
		// Start timer for flashing LEDs every second.
		Timer flashTimer = new Timer();
		flashTimer.scheduleAtFixedRate(new TimerTask() {
			private boolean on;
	    	@Override
		    public void run() {
	    		// Determine whether LEDs are flashing on or off.
	    		if (flashingLEDs.size() != 0) {
	    			if (flashingLEDs.get(0).getBackground() == Color.RED)
	    				on = true;
	    			else 
	    				on = false;
	    		}
				// Flash each LED in the array list.
				for (int i=0; i<flashingLEDs.size(); i++) {
				   if (on) {
					   // Turn off light
					   flashingLEDs.get(i).setBackground(new Color(157, 162, 149));
				   }
				   else {
					   // Turn on light
					   flashingLEDs.get(i).setBackground(Color.RED);
				   }	
				}
		   }
		}, 1000, 1000);


		/*
		 * Gauges, switches, and buttons
		 */
		for (int i=0; i<24; i++) {
			// Gauges
			int perc = Integer.parseInt(gaugeStates[i]);
			movePointer(i, perc);
			
			// Buttons
			buttonArray[i].setStatus(Integer.parseInt(buttonStates[i]));
			
			
			// Set switch states.
			int status = Integer.parseInt(switchStates[i]);
			if (status == 1) {
				moveLever(i, 18, false);
			}
			else {
				moveLever(i,0, false);
			}
		}
		
        /****************************************************************************************
         * Testing
         */
		/*
        try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
        
        // Test LEDs   
        int delay = 1000; //milliseconds
        // Flash led for no reason
       Timer timer = new Timer();
       timer.scheduleAtFixedRate(new TimerTask() {
    	   @Override
    	   public void run() {
    		   if (ledLabel[0][4] != null && ledLabel[1][6] != null && ledLabel[2][1] != null) {
    			   ledLabel[0][4].setBackground(Color.RED);
    		   
	    		   if (ledLabel[1][6].getBackground() == Color.RED) {
	    			   ledLabel[1][6].setBackground(new Color(157, 162, 149));
	    			   ledLabel[2][1].setBackground(new Color(157, 162, 149));
	    	   	   }
	    		   else { 
	    			   ledLabel[1][6].setBackground(Color.RED);
	    			   ledLabel[2][1].setBackground(Color.RED);
	    		   }
    		   }
    	   }
       }, delay, delay);
*/
		/*
       Timer timer2 = new Timer();
       
       timer2.scheduleAtFixedRate(new TimerTask() {
    	   int k=0, j=0, flag=1, flag2=1;
    	   int i=0;
    	   
    	   @Override
    	   public void run() {
    		   if (k == 100)
    			   flag = 0;
    		   else if (k == 0)
    			   flag = 1;
    		   if (flag == 0)
    			   k--;
    		   else k++;
    		   

    		   if (i%10 == 0) {
    			   movePointer(1, i);
    		   }
    			   movePointer(0, i);
 
    		   i++;
    		   if (i==100) {
    			   i=0;
    		   }
    	   }
       }, 1000, 30);
       */
    }