public void actionPerformed(ActionEvent e){
		if(e.getSource() == cancel){
			reset();
		} else if (e.getSource() == next){
			if(numNext == 0)
					createNewMatrixB();
			else if(numNext ==1){
				try{
					createNewMatrixC();
				} catch(NumberFormatException exception) {
					JOptionPane.showMessageDialog(null, "Invalid inputs!", "Error", JOptionPane.ERROR_MESSAGE);
				}
			} 
		} else if(e.getSource() == createAsNew){
			createAsNewM();
		}
	}