Java JOptionPane Message excMsg(String msg, Throwable t)

Here you can find the source of excMsg(String msg, Throwable t)

Description

Exception message dialog.

License

Open Source License

Parameter

Parameter Description
msg a parameter
t a parameter

Declaration

public static void excMsg(String msg, Throwable t) 

Method Source Code

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

import javax.swing.JOptionPane;

public class Main {
    /**//ww  w  .jav a2 s  .co  m
     * Exception message dialog. Displays message plus the exception and
     * exception message. Actually handles the more general Throwable.
     * 
     * @param msg
     * @param t
     */
    public static void excMsg(String msg, Throwable t) {
        msg += "\n" + "Throwable: " + t + "\n" + t.getMessage();
        // Show it in a message box
        JOptionPane.showMessageDialog(null, msg, "Error", JOptionPane.ERROR_MESSAGE);
        System.out.println(msg);
    }
}

Related

  1. displayMessage(Component parentComponent, String message, String windowTitle, int messageType)
  2. displayMessage(String message)
  3. displayMessagePane(String desc, String title)
  4. excMsg(String msg, Exception ex)
  5. excMsg(String msg, Exception ex)
  6. exibeMsg(String msg, int tipoMsg)
  7. getIconForType(int messageType)
  8. getInput(String msg, String defaultInput)
  9. getInt(String message, int min, int max, Integer initialValue)