Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

get input in java using joptionpane

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);
    }
}
Source by mkyong.com #
 
PREVIOUS NEXT
Tagged: #input #java #joptionpane
ADD COMMENT
Topic
Name
5+7 =