public void handleLoadMachineButton() {
    	if((loadView.getFileList().getSelectedIndex() >=0) && (loadView.getFileList().getSelectedValue() != null)){    		
	    	String machine = (String)loadView.getFileList().getSelectedValue();
	    	File directory = new File("Saved/" + machine);
	    	File model = new File(directory + "/" + machine + ".model");
	    	File start = new File(directory + "/" + machine + ".start");
	    	File transition = new File(directory + "/" + machine + ".transition");
	    	File input = new File(directory + "/" + machine + ".input");
	    	if((model.exists()) && (start.exists()) && (transition.exists()) && (input.exists())){
		    	try { 		
		    		TuringMachine aNewTuringMachine = new TuringMachine();
		    		TuringMachineStartPanel aNewStartView = new TuringMachineStartPanel();
		    		TuringMachineTransitionPanel aNewTransitionView = new TuringMachineTransitionPanel();
		    		TuringMachineInputPanel aNewInputView = new TuringMachineInputPanel();		    		
		    		
		    		ObjectInputStream modelIn; 
					modelIn = new ObjectInputStream(new FileInputStream(directory + "/" + machine + ".model")); 
					aNewTuringMachine = (TuringMachine)modelIn.readObject(); 
					modelIn.close();
					
					ObjectInputStream startIn; 
					startIn = new ObjectInputStream(new FileInputStream(directory + "/" + machine + ".start")); 				
					aNewStartView = (TuringMachineStartPanel)startIn.readObject(); 
					startIn.close();
					
					ObjectInputStream transitionIn; 
					transitionIn = new ObjectInputStream(new FileInputStream(directory + "/" + machine + ".transition")); 
					aNewTransitionView = (TuringMachineTransitionPanel)transitionIn.readObject(); 
					transitionIn.close();
		
					ObjectInputStream inputIn; 
					inputIn = new ObjectInputStream(new FileInputStream(directory + "/" + machine + ".input")); 				
					aNewInputView = (TuringMachineInputPanel)inputIn.readObject(); 
					inputIn.close();
		
					new TuringMachineFrame(machine, true, aNewTuringMachine, new TuringMachineMenuPanel(), new TuringMachineLoadPanel(), aNewStartView, aNewTransitionView, aNewInputView, new TuringMachineSimulationPanel());
				
				} catch (ClassNotFoundException e) { 
					System.out.println("Error: Object'c class does not match"); 
				} catch (FileNotFoundException e) { 
					System.out.println("Error: Cannot open file for writing"); 
				} catch (IOException e) { 
					System.out.println("Error: Cannot read from file"); 
				}
	    	}
    	}	
    }