Here you can find the source of showInput(String message)
public static Optional<String> showInput(String message)
//package com.java2s; //License from project: Apache License import java.util.Optional; import javax.swing.JOptionPane; public class Main { public static Optional<String> showInput(String message) { return Optional.ofNullable(JOptionPane.showInputDialog(message)); }/* ww w. j a va 2s . c o m*/ }