InputDialogWithPredefinedMessageIcon.java Source code

Java tutorial

Introduction

Here is the source code for InputDialogWithPredefinedMessageIcon.java

Source

import javax.swing.JOptionPane;

public class InputDialogWithPredefinedMessageIcon {
    public static void main(String[] a) {
        String input = JOptionPane.showInputDialog(null, "Enter Input:", "Dialog for Input",
                JOptionPane.WARNING_MESSAGE);
        System.out.println(input);
    }
}