@Override
		public void actionPerformed(ActionEvent e) {
			
			//If run button is pressed
			if(e.getSource().equals(btnRun)){
				
				//Call the run method
				try {
					Main.run(net1, net2);
				} catch (Exception e1) {
					e1.printStackTrace();
				}
			}
			
			//Select comparison file button
			if(e.getSource().equals(btnCompFile) || e.getSource().equals(btnTrainFile)){
				
				int retval = filec.showOpenDialog(frame);
				
				//File chosen, pass this file to the blastreader
				if(retval == JFileChooser.APPROVE_OPTION){			
					
					
					if(e.getSource().equals(btnCompFile)){
					
						compf = filec.getSelectedFile();		
						try {
							setCFileText(compf.getName());
							BlastReader.setComp(compf);		
							System.out.println(compf.getName());
						} catch (FileNotFoundException e1) {
							e1.printStackTrace();
						}			
					}
					else{
						
						trainf = filec.getSelectedFile();
						setTFileText(trainf.getName());
						TrainNet.setFile(trainf);						
					}
						
				}
			}			
				
			
			if(e.getSource().equals(btnTrain)){
				if(nettoggle == 0)
					try {
						TrainNet.train(net1);
					} catch (IOException e2) {
						// TODO Auto-generated catch block
						e2.printStackTrace();
					} catch (Exception e2) {
						// TODO Auto-generated catch block
						e2.printStackTrace();
					}
				else
					try {
						TrainNet.train(net2);
					} catch (Exception e1) {
						// TODO Auto-generated catch block
						e1.printStackTrace();
					}
			}
			
			
			if(e.getSource().equals(network1)){
				nettoggle = 0;
				System.out.println(nettoggle);
			}
			if(e.getSource().equals(network2)){
				nettoggle = 1;
				System.out.println(nettoggle);
			}
			
			if(e.getSource().equals(tolsub)){	
				Main.setlimit(Integer.parseInt(tolv.getText()));		
				setResultText("Tolerance Value Set: " + Integer.parseInt(tolv.getText()));
			}
		}