Java JOptionPane Error showError(Component parentComponent, Exception e)

Here you can find the source of showError(Component parentComponent, Exception e)

Description

show Error

License

Open Source License

Declaration

public static void showError(Component parentComponent, Exception e) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.Component;

import java.io.PrintWriter;
import java.io.StringWriter;

import javax.swing.JOptionPane;

public class Main {
    public static void showError(Component parentComponent, Exception e) {
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        e.printStackTrace(pw);/*w  w  w. j a va 2 s  .  com*/
        JOptionPane.showMessageDialog(parentComponent, sw.toString());
    }
}

Related

  1. showBlockedErrorMsg(final Container parent, final String message, final boolean exit)
  2. showError(Component component, String title, String message)
  3. showError(Component father, String title, String content)
  4. showError(Component parent, String message)
  5. showError(Component parent, String message)
  6. showError(Component where, String msg)
  7. showError(Exception e)
  8. showError(Exception e)
  9. showError(Exception e)