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;

import javax.swing.UIManager;

public class Main {
    /**
     * Shows a warning message dialog.
     * 
     * @param c
     *            determines the Frame in which the dialog is displayed.
     * @param msg
     *            the message to display.
     */
    public static void showWarningDialog(Component c, String msg) {
        JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(c), msg,
                UIManager.getString("OptionPane.warningDialogTitle"), JOptionPane.WARNING_MESSAGE);
    }
}