get String Dialog - Java Swing

Java examples for Swing:JOptionPane

Description

get String Dialog

Demo Code


//package com.java2s;
import java.awt.Component;
import javax.swing.JOptionPane;

public class Main {
    public static String getStringDialog(Component father, String title,
            String defaultMsg) {/*from  w ww.  j  av  a2  s. c o m*/
        return (String) JOptionPane.showInputDialog(father, title,
                defaultMsg);
    }
}

Related Tutorials