public void createActions() { //create the action objects that are used when arrow keys are pressed	
		UpAction = new AbstractAction("Move Up") {  
		    public void actionPerformed(ActionEvent e)  
		    {  
		        if (board.isValid("up") && board.validMove) {
			    	board.move("up");
			        board.newRandomTile();
			        updateLabels(); //update after moving and after a new tile appears
			        topbar.update();
		        }
		    }  
		};
		
		DownAction = new AbstractAction("Move Down") {  
		    public void actionPerformed(ActionEvent e)  
		    {  
		    	if (board.isValid("down") && board.validMove) {
			    	board.move("down");
			        board.newRandomTile();
			        updateLabels();
			        topbar.update();
		    	}
		    }  
		};
		
		RightAction = new AbstractAction("Move Right") {  
		    public void actionPerformed(ActionEvent e)  
		    {  
		        if (board.isValid("right") && board.validMove) {
			    	board.move("right");
			        board.newRandomTile();
			        updateLabels();
			        topbar.update();
		        }
		    }  
		};
		
		LeftAction = new AbstractAction("Move Left") {  
		    public void actionPerformed(ActionEvent e)  
		    {  
		    	if (board.isValid("left") && board.validMove) {
			        board.move("left");
			        board.newRandomTile();
			        updateLabels();
			        topbar.update();
		    	}
		    }  
		};
	}