Here you can find the source of showError(String message)
public static void showError(String message)
//package com.java2s; //License from project: Open Source License import javax.swing.JDialog; import javax.swing.JOptionPane; public class Main { public static void showError(String message) { //custom title, error icon JOptionPane.showMessageDialog(new JDialog(), message, "Error", JOptionPane.ERROR_MESSAGE); }/*from www . j a v a 2 s. c o m*/ }