cicurel
asked on
opening a password verification JFrame while program is running.
Hi.
it is a bit hard to explain what i am trying to do, but i will try.
I have a program i wrote, which is running all the time through a connection and calculate things.
And i want to open a JFrame for verificating a password for making some operations in it.
I have managed to create the JFrame with the user and password fields and the buttons.
but i have trouble making the main program / JFrame to wait for the user.
i am looking to make some sort of:
String inputValue = JOptionPane.showInputDialo g("Please input a value");
or:
boolean verified = MyOptionPane.waitForVerifi cation();
which opens a JFrame for the user to enter the user and password.
i hope i made myself clear enough here.
Thank you.
it is a bit hard to explain what i am trying to do, but i will try.
I have a program i wrote, which is running all the time through a connection and calculate things.
And i want to open a JFrame for verificating a password for making some operations in it.
I have managed to create the JFrame with the user and password fields and the buttons.
but i have trouble making the main program / JFrame to wait for the user.
i am looking to make some sort of:
String inputValue = JOptionPane.showInputDialo
or:
boolean verified = MyOptionPane.waitForVerifi
which opens a JFrame for the user to enter the user and password.
i hope i made myself clear enough here.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
A modal dialog will freeze execution till you answer it :-)
Not sure why it's called "modal" the dictionary doesn't really help either...something about:
Modal : Something with logical Modality
Modality : The state of a Modal object
bah...language recursion ;-)
So if you set the dialog modal, the program will wait until that dialog is no longer visible (hide() or user closes it)
Good luck!
Tim.
Not sure why it's called "modal" the dictionary doesn't really help either...something about:
Modal : Something with logical Modality
Modality : The state of a Modal object
bah...language recursion ;-)
So if you set the dialog modal, the program will wait until that dialog is no longer visible (hide() or user closes it)
Good luck!
Tim.
ASKER
it is much easier then i thought :)