Here you can find the source of error(Component parent, String message)
public static void error(Component parent, String message)
//package com.java2s; /*/*from w ww . j a v a 2 s.co m*/ * @(#)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 error(Component parent, String message) { JOptionPane.showMessageDialog(parent, message, "Error", JOptionPane.ERROR_MESSAGE); } }