Java JFrame displayError(Exception e, JFrame jFrame)

Here you can find the source of displayError(Exception e, JFrame jFrame)

Description

display Error

License

Open Source License

Parameter

Parameter Description
e Exception who's StackTrace/message is to be displayed

Declaration

public static void displayError(Exception e, JFrame jFrame) 

Method Source Code

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

import javax.swing.JFrame;
import javax.swing.JOptionPane;

public class Main {
    public static final boolean DEBUG = false;

    /**//from   w ww. ja  v a  2 s  .  c o m
     * 
     * @param e Exception who's StackTrace/message is to be displayed
     */
    public static void displayError(Exception e, JFrame jFrame) {
        if (DEBUG) {
            e.printStackTrace();
        } else {
            JOptionPane.showMessageDialog(jFrame, "Error Occurred: " + e.getMessage());
        }
    }
}

Related

  1. dialogYesNo(JFrame frame, String title, String message, Object[] options)
  2. dispAlert(JFrame pFrame, String pTask, String pMessaggio)
  3. dispErrore(JFrame frame, String task, String mess)
  4. display(JFrame parent, JInternalFrame dialog)
  5. displayConfirmationMessage(JFrame parent, String message, String title)
  6. displayWindow(final JFrame window)
  7. dispose(final JFrame frame)
  8. doDisableActiveRenderingInEDT(final JFrame jFrame)
  9. drawHelpPanel(String helpToDisplay, final JFrame frame)