Here you can find the source of showActionFailedWithExceptionMessage(final Component parent, final Exception ex)
public static void showActionFailedWithExceptionMessage(final Component parent, final Exception ex)
//package com.java2s; //License from project: Apache License import java.awt.Component; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; public class Main { public static void showActionFailedWithExceptionMessage(final Component parent, final Exception ex) { SwingUtilities.invokeLater(new Runnable() { @Override/*from www . ja va2 s.c om*/ public void run() { JOptionPane.showMessageDialog(parent, "Die Aktion konnten nicht abgeschlossen werden, da folgender Fehler auftrat:\n<HTML><I>" + ex.getLocalizedMessage() + "</I></HTML>", "Aktion fehlgeschlagen", JOptionPane.ERROR_MESSAGE); } }); } }