0

hii I want show a pop up Dialog box when i click on to button

Explanation:

Actually i m creating a program in which i send a mail to email id I want to take email address to send mail for that I want a pop up dialog which ask me to type email valid address after that i want to take that email address from that dialog box for send mail

objects
  • 8,637
  • 4
  • 30
  • 38
Hussain
  • 927
  • 1
  • 16
  • 21
  • 1
    you just need to click the tick next to the answer to accept it, not that hard and encourages more people to answer your questions in the future – objects Mar 09 '10 at 09:09
  • See also https://stackoverflow.com/questions/7080205/popup-message-boxes – Troyseph Mar 10 '21 at 09:43

1 Answers1

3

You can use JOptionPane for that

http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html#input

objects
  • 8,637
  • 4
  • 30
  • 38
  • thanks a lot...... i ve used "JOptionPane.showInputDialog("Enter valid emaiId");" but now i want to perform some action on that "email id" – Hussain Mar 09 '10 at 06:55
  • showInputDialog returns the value entered by the user so you can use String emailId = JOptionPane.showInputDialog(... – objects Mar 09 '10 at 07:21