Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JOptionPane

Status
Not open for further replies.

axr9

Programmer
Sep 17, 2003
1
US
I want to use JOptionPane to create a login window for my java class. I did find sample code at the java.sun.com site.

For example:
String name = JOptionPane.showInputDialog("Please input name: firstname lastname");
String passwrd = JOptionPane.showInputDialog("Please input password");

I run this barebone code (at the command line prompt)and get separate dialog boxes as expected but the code execution doesn't end at the command line prompt after I close all dialog boxes. I'm not sure what is going on behind the scene and would appreciate your help.
 
I could be wrong, but I believe that as part of this class's functionality, it's launched thread blocks until the OK/Cancel button is clicked. This behaviour is standard practice among "pop-up" windows - because the point of it is to call attention to the user, so they must make a choice before proceeding with the program ...

(PS, this forum is meant for J2EE questions, not J2SE issues).

Ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top