Here you can find the source of warn(Component parent, String message)
public static void warn(Component parent, String message)
//package com.java2s; /*/*from ww w. j av a 2 s. com*/ * @(#)Util.java * * Created on 2005. 12. 15 * * This software is the confidential and proprietary informatioon of * POSTECH DP&NM. ("Confidential Information"). You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into * with Eric Kang. * * Contact: Eric Kang at eliot@postech.edu */ import javax.swing.*; import java.awt.*; public class Main { public static void warn(Component parent, String message) { JOptionPane.showMessageDialog(parent, message, "Warning", JOptionPane.WARNING_MESSAGE); } }