package com.mkyong.inputDialog;
import javax.swing.JOptionPane;
public class SimpleInputDialog1 {
public static void main(String[] args){
String m = JOptionPane.showInputDialog("Anyone there?");
System.out.println(m);
}
}
import javax.swing.JOptionPane;
public class Sample {
public static void main(String[] args) {
String name = "";
name = JOptionPane.showInputDialog("Please Enter your name");
String msg = "Hello " + name + "!";
JOptionPane.showMessageDialog(null, msg);
}
}