Java JOptionPane Message showExceptionMessage(Exception e)

Here you can find the source of showExceptionMessage(Exception e)

Description

show Exception Message

License

LGPL

Declaration

public static boolean showExceptionMessage(Exception e) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import javax.swing.JDialog;

import javax.swing.JOptionPane;

import javax.swing.UIManager;

public class Main {

    public static boolean showExceptionMessage(Exception e) {
        try {/*from   ww w. ja  v  a 2s  . c  om*/
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception el) {
            JOptionPane.showMessageDialog(new JDialog(), e.getMessage());
            el.printStackTrace();
        }
        JOptionPane.showMessageDialog(new JDialog(), e.getMessage());
        e.printStackTrace();
        return false;
    }
}

Related

  1. showException(Component c, String message, Throwable t)
  2. showException(String message, Exception ex)
  3. showExceptionMessage(Component parent, Throwable t)
  4. showExceptionMessage(Component parentComponent, Exception exception)
  5. showExceptionMessage(Exception e)
  6. showInput(Component parent, String message, String initValue)
  7. showInput(String message)
  8. showInputInteger(String message)
  9. showInvalidJarPathMessage(String jarPath)