Here you can find the source of showWarning(Component owner, String msg)
Parameter | Description |
---|---|
owner | a parameter |
msg | a parameter |
public static void showWarning(Component owner, String msg)
//package com.java2s; //License from project: Open Source License import java.awt.Component; import javax.swing.JOptionPane; public class Main { /**// w w w . j av a 2s . c o m * Shows a warning dialog * * @param owner * @param title * @param msg */ public static void showWarning(Component owner, String title, String msg) { JOptionPane.showMessageDialog(owner, msg, title, JOptionPane.WARNING_MESSAGE); } /** * Shows a warning dialog * * @param owner * @param msg */ public static void showWarning(Component owner, String msg) { showWarning(owner, "Warning", msg); } /** * Shows a warning dialog * * @param msg */ public static void showWarning(String msg) { showWarning(null, msg); } }