Java tutorial
import javax.swing.JFrame; import javax.swing.JOptionPane; public class Main { public static void main(String[] args) { JFrame frame = new JFrame(); frame.setVisible(true); String message = JOptionPane.showInputDialog(frame, "Would this be enough?.", "My dialog asks....", JOptionPane.INFORMATION_MESSAGE); System.out.println("Got " + message); frame.dispose(); } }