public void trainBtnPress()
	{
		//make or load a nerual network
		//currently we are just creating a new one based on the given topology.
		
		//-- Get the topology.
		//Create a neural network with given topology.
		
		//Get hidden topology
		String [] sigHidden = sigNetNeurons.getText().split(",");
		String [] scrawlHidden = scrawlNetNeurons.getText().split(",");
		
		int tempInt;
		ArrayList<Integer> sigList = new ArrayList<Integer>();
		ArrayList<Integer> scrawlList = new ArrayList<Integer>();
		int[] sigTop;
		int [] scrawlTop;
		
		//put sig into the list
		for (String str : sigHidden)
		{
			tempInt = Integer.parseInt(str);
			if (tempInt > 0)
			{
				sigList.add(tempInt);
			}
		}
		//put scrawl into the list
		for (String str : scrawlHidden)
		{
			tempInt = Integer.parseInt(str);
			if (tempInt > 0)
			{
				scrawlList.add(tempInt);
			}
		}
		
		tempInt = 0;
		sigTop = new int[sigList.size()];
		for (Integer theInt : sigList)
		{
			sigTop[tempInt++] = theInt.intValue();
		}
		
		tempInt = 0;
		scrawlTop = new int[scrawlList.size()];
		for (Integer theInt : scrawlList)
		{
			scrawlTop[tempInt++] = theInt.intValue();
		}
		//-- Got the topology.
		
		//-- Create the neural network.
		controller.createNetworkIfNotExist(sigTop,scrawlTop);
		//-- Created the neural network
		
		//-- Train the neural network.
		if (trainingFile != null)	
		{
			controller.trainNetwork(trainingFile, ((Integer)itrSpinner.getValue()).intValue() );
		}
		else
		{
			return;
		}
		//-- Trained the neural network. 
		
		//-- Compute the accuracy and print the results
		controller.printAccuracy();
		//-- Computed the accuracy and printed the results
	}