JOptionPane is not a method but a class located at javax.swing package. you can use this class to create dialog boxes with an ease. most notably is the message box , for example: JOptionPane.showMessageDialog(this,"yo");
To prompt users and get input in a String : String name = JOptionPane.showInputDialog("Enter name " );
From the API for JOptionPane class at :http://java.sun.com/j2se/1.3/docs/api/
"showConfirmDialog Asks a confirming question, like yes/no/cancel. showInputDialog Prompt for some input. showMessageDialog Tell the user about something that has happened. showOptionDialog The Grand Unification of the above three. "
What's brown and sticky? ... a stick. Or a tiny ad.