private void saveChanges(boolean exit) {
		String name = txtName.getText();
		
		if(name.equals("") || name.trim().equals("") || name == null) {
			JOptionPane.showMessageDialog(this, "Name cannot be empty.");
		} else if(!StringUtil.isValidString(name)) {
			JOptionPane.showMessageDialog(EditTeam.this, "Team Name" + Constants.INVALID_CHAR_SEQ_MSG);
		} else {
			boolean save = true;
			for(int i = 0; i < pv.teams.size(); i++) {
				String teamName = pv.teams.get(i).getTeamName();
				if(teamName.equals(name) && !teamName.equals(teamChooser.getSelectedItem())) {
					JOptionPane.showMessageDialog(this, "There's already a team named " + name + "!");
					save = false;
					break;
				}
			}
			
			if(save) {
				Team toSave = (Team) teamChooser.getSelectedItem();
				
				if(toSave != null) {
					toSave.setTeamName(name);
					toSave.setColor(currentColor);
					txtName.setText("");
					if(exit) resetAndDispose();
					else updateChooser();
				} else {
					System.out.println("Error saving changes..");
				}
			}
		}
	}