|
I wrote a small authenticator class. It is designed to pop up a window, allow
the user to type in their information and return a PasswordAuthentication
object. To do this when the authenticator is created, in the constructor I pop
up the window.
public MyAuthenticator() {
super();
getJDialog();
JDialog.show();
In my button on the window I take the values and move them to strings which get
sent back in the protected PasswordAuthentication getPasswordAuthentication()
method which consists simply of return (new PasswordAuthentication
(uname,pass.toCharArray())).
In my main program that uses the authenticator I do the following:
........
Authenticator a = new MyAuthenticator();
Authenticator.setDefault(a);
........
When I run this code, the window pops up in the Authenticator class, but the
main program seems to keep chugging along - not waiting for my data entry into
the window. The window itself works fine, but the main program just seems to
not want to wait for the data coming back from it.
I know the authenticator class works fine other than the GUI. If I supress the
GUI and just force in a user name and password, everything runs fine. When I
put in the GUI, it does not.
Any ideas where I may be going wrong?
Larry
_______________________________________________
No banners. No pop-ups. No kidding.
Make My Way your home on the Web - http://www.myway.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.