public void keyPressed(KeyEvent arg0) 
	{
		int keyCode = arg0.getKeyCode();
		   
	    if(keyCode == KeyEvent.VK_ENTER)
	    {
	    	name = inputName.getText();
        	for(int i = 0; i < name.length(); i++)
        	{
        		if(name.charAt(i) == ' ' && i < name.length() - 1)
        		{
        			name = name.substring(0, i) + name.substring(i + 1);
        		}
        	}
        	
	        if(inputName.getText().length() > 9 || inputName.getText().length() < 1)
	        {	
	        	
	        }
	        else if(name.equals("\r\n"))
	        {
	        	name = "rn";
	        }
	        else
	        { 																						    
	        	try 
	        	{ 
	        		out1.write("\r\n" + name +  " " + score + " " + level);
				} catch (IOException e) {}
	        	try 
	        	{
	        		out1.close();
				} catch (IOException e) {}		
	        	layout.swapView("Start Menu");	        
	        }
	    }
	}