Here you can find the source of showErrorMessage(Component parentComponent, String message, String title)
public static void showErrorMessage(Component parentComponent, String message, String title)
//package com.java2s; //License from project: Open Source License import java.awt.Component; import javax.swing.JOptionPane; public class Main { public static void showErrorMessage(Component parentComponent, String message, String title) { showMessage(parentComponent, title, message, JOptionPane.ERROR_MESSAGE); }// w ww . ja v a 2 s . co m public static void showErrorMessage(Component parentComponent, String message) { showErrorMessage(parentComponent, message, "Error"); } public static void showErrorMessage(String message) { showErrorMessage(null, message); } public static void showMessage(Component parentComponent, String title, String message, int messageType) { JOptionPane.showMessageDialog(parentComponent, message, title, messageType); } }