Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.awt.Component;

import javax.swing.JOptionPane;

public class Main {
    /**
     * Shows an input dialog.
     * 
     * @param c
     *            the parent component.
     * @param msg
     *            the message to display.
     * @return the string typed by the user, or <code>null</code> if the user cancels the option pane.
     */
    public static String showInputDialog(Component c, String msg) {
        return JOptionPane.showInputDialog(JOptionPane.getFrameForComponent(c), msg);
    }
}