@Override
	public void actionPerformed(ActionEvent e) {
		if (e.getSource() == nameField)
			changeTitle(nameField.getText());
		else if (e.getSource() == okBtn) {
			ok = true;
			setVisible(false);
		} else if (e.getSource() == cancelBtn) {
			ok = false;
			setVisible(false);
		}
	}