Here you can find the source of errMsg(Component owner, String msg, Exception e)
Parameter | Description |
---|---|
owner | the owner of the message, or null |
msg | the message to display, or null |
e | the exception object describing the error, or null |
public static void errMsg(Component owner, String msg, Exception e)
//package com.java2s; /*// w ww . j a va 2 s.c o m * This file is part of the Scriba source distribution. This is free, open-source * software. For full licensing information, please see the LicensingInformation file * at the root level of the distribution. * * Copyright (c) 2006-2007 Kobrix Software, Inc. */ import java.awt.Component; import javax.swing.JOptionPane; public class Main { private static final String ERR_TITLE = "Error"; /** * show an error message and print a stack trace to the console if in * development mode (DEV_MODE = true) * * @param owner the owner of the message, or null * @param msg the message to display, or null * @param e the exception object describing the error, or null */ public static void errMsg(Component owner, String msg, Exception e) { if (msg != null) { JOptionPane.showMessageDialog(owner, msg, ERR_TITLE, JOptionPane.ERROR_MESSAGE); } if (e != null) { e.printStackTrace(); } } }