From your JFrame code, make a call like this... String value = JOptionPane.showInputDialog(....) You dont need to create your own custom dialog since JOptionPane does it for you. The method showInputDialog() is overloaded to accomodate different arguments, such as dialog title, dialog message, etc. In any event, a call to this static method will display a dialog window to the user with a text field to enter data. After the user clicks OK, the data they entered in the text field will be assigned to the 'value' variable in the code snippet above. Hope it helps SAF
Joined: Jul 11, 2001
Hi SAF, I can't use the default dialog box because my dialog box need to have more than 1 textField and a passwordField. So can you help me solve the previous probelm, Thanks!
"teeming" your name is not in accordance with the javaranch guidelines. Please take a moment and re-register after selecting a valid name. you can find the guidelines at http://www.javaranch.com/name.jsp thanks for your cooperation. - satya