Here you can find the source of showPrettyErrorPane(Component caller, String msg)
public static void showPrettyErrorPane(Component caller, String msg)
//package com.java2s; //License from project: Open Source License import java.awt.Component; import javax.swing.JOptionPane; public class Main { public static void showPrettyErrorPane(Component caller, String msg) { JOptionPane.showMessageDialog(caller, "<html><body><p style='width: 200px;'>" + msg + "</p></body></html>", "Error", JOptionPane.ERROR_MESSAGE); }/*from w w w . jav a2 s . c o m*/ }