Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

JOption input java


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);

    }

}
Comment

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);
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: change image on button click android studio 
Java :: flow dependency android 
Java :: java get date in utc 
Java :: java put a char array into a string 
Java :: java set from string array 
Java :: is upper in java 
Java :: java scanner string nextline after nextint 
Java :: start activity intent 
Java :: java thread dump 
Java :: how to get data from combobox in java 
Java :: how to read file from console in java 
Java :: double to string java 
Java :: check if string is uuid 
Java :: convert char to string in java 
Java :: java remove space at the end of string 
Java :: java download image file 
Java :: timestamp java jpa 
Java :: string vs stringbuffer 
Java :: how to check null and empty string in java 
Java :: get raondom from array java 
Java :: switch case java with char 
Java :: unique elements in array java 
Java :: how to remove null values in java 
Java :: 64 bit integer java 
Java :: repository query spring boot 
Java :: java type casting 
Java :: glide library in android studio 
Java :: Concept of Association in java 
Java :: java print type of variable 
Java :: spring filter exception handling 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =