Here you can find the source of showError(String errorMsg)
public static void showError(String errorMsg)
//package com.java2s; //License from project: Open Source License import javax.swing.JOptionPane; import javax.swing.JFrame; public class Main { public static void showError(JFrame parent, String errorMsg) { JOptionPane.showMessageDialog(parent, errorMsg, "Error", JOptionPane.ERROR_MESSAGE); }// w w w .ja v a2s . c o m public static void showError(String errorMsg) { showError(null, errorMsg); } }