Java JOptionPane Message getStrInPane(String message, String title)

Here you can find the source of getStrInPane(String message, String title)

Description

This method will display an input dialog box to receive a string of input from user

License

Open Source License

Parameter

Parameter Description
message message to be displayed
title title of window

Return

string input from user

Declaration

public static String getStrInPane(String message, String title) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import javax.swing.*;

public class Main {
    /**/*from w w w  . j a v a2  s  .  com*/
     * This method will display an input dialog box
     * to receive a string of input from user
     *
     * @param message message to be displayed
     * @param title   title of window
     * @return string input from user
     */
    public static String getStrInPane(String message, String title) {
        return JOptionPane.showInputDialog(null, message, title, JOptionPane.QUESTION_MESSAGE);
    }
}

Related

  1. getIntegerInput(String message)
  2. getJOptionPaneIcon(int jOptionPaneMessageType)
  3. getPassword(String message)
  4. getString(Component component, String message)
  5. getStringInput(String message)
  6. getUserInputString(String message)
  7. globalMessagebox(String body, String title, int icon)
  8. input(Component comp, String title, String message, Object def)
  9. input(String message, String title)