taverna-credential-manager-ui/src/main/java/org/apache/taverna/workbench/ui/credentialmanager/GetMasterPasswordDialog.java [110:163]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
		getContentPane().add(buttonsPanel, SOUTH);

		addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosing(WindowEvent evt) {
				closeDialog();
			}
		});

		setResizable(false);
		getRootPane().setDefaultButton(okButton);
		pack();
	}

	/**
	 * Get the password entered in the dialog.
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * Check that the entered password is not empty and store the entered
	 * password.
	 */
	private boolean checkPassword() {
		password = new String(passwordField.getPassword());

		if (password.isEmpty()) {
			showMessageDialog(this, "The password cannot be empty",
					WARN_TITLE, WARNING_MESSAGE);
			return false;
		}

		return true;
	}

	private void okPressed() {
		if (checkPassword())
			closeDialog();
	}

	private void cancelPressed() {
		/*
		 * Set the password to null as it might have changed in the meantime if
		 * user entered something then cancelled.
		 */
		password = null;
		closeDialog();
	}

	private void closeDialog() {
		setVisible(false);
		dispose();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



taverna-credential-manager-ui/src/main/java/org/apache/taverna/workbench/ui/credentialmanager/GetPasswordDialog.java [113:162]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        getContentPane().add(buttonsPanel, SOUTH);

		addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosing(WindowEvent evt) {
				closeDialog();
			}
		});

        setResizable(false);
        getRootPane().setDefaultButton(okButton);
        pack();
	}

	/**
	 * Get the password entered in the dialog.
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * Check that the password entered is not empty and store the entered
	 * password.
	 */
	private boolean checkPassword() {
		password = new String(passwordField.getPassword());

		if (password.isEmpty()) {
			showMessageDialog(this, "The password cannot be empty",
					WARN_TITLE, WARNING_MESSAGE);
			return false;
		}

		return true;
	}

	private void okPressed() {
        if (checkPassword())
            closeDialog();
    }

	private void cancelPressed() {
		password = null;
		closeDialog();
	}

	private void closeDialog() {
		setVisible(false);
		dispose();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



