Java JOptionPane Message showException(String message, Exception ex)

Here you can find the source of showException(String message, Exception ex)

Description

Presents a modal dialog displaying the given message and information about the given exception.

License

Open Source License

Declaration

public static void showException(String message, Exception ex) 

Method Source Code

//package com.java2s;

import javax.swing.JOptionPane;

public class Main {
    /**/*from   w  ww .ja  v  a 2  s.  c o  m*/
     * Presents a modal dialog displaying the given message and information
     * about the given exception.  Also prints a stack trace to stderr.
     */
    public static void showException(String message, Exception ex) {
        ex.printStackTrace();
        JOptionPane.showMessageDialog(null, message + "\n\n" + ex + "\n");
    }
}

Related

  1. select(String[] selList, String msg)
  2. show(String title, int type, Object message, Object[] options, Object initialOption)
  3. showActionFailedWithExceptionMessage(final Component parent, final Exception ex)
  4. showAlert(String message)
  5. showException(Component c, String message, Throwable t)
  6. showExceptionMessage(Component parent, Throwable t)
  7. showExceptionMessage(Component parentComponent, Exception exception)
  8. showExceptionMessage(Exception e)
  9. showExceptionMessage(Exception e)