[Kde-java] password prompt
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Wed Oct 20 18:03:30 CEST 2004
On Wednesday 20 October 2004 16:36, Clint Allen wrote:
> What's the recommended KDE-Java way to pop up a password auth dialog, so I
> can have the user enter the root password? I took a look at AuthInfo but
> couldn't figure out how to use it. (I checked the list archives, too :-)
Can you just use KPasswordDialog?
int result;
StringBuffer password = new StringBuffer();
result = KPasswordDialog.getPassword(password, "Enter Password");
if (result == 1) {
System.out.println("Password is " + password.toString());
}
-- Richard
More information about the Kde-java
mailing list