Java JOptionPane Error showErrorMessage(Component c, Exception e)

Here you can find the source of showErrorMessage(Component c, Exception e)

Description

show Error Message

License

Open Source License

Declaration

public static void showErrorMessage(Component c, Exception e) 

Method Source Code


//package com.java2s;
import javax.swing.*;
import java.awt.*;

public class Main {
    public static void showErrorMessage(Component c, Exception e) {
        JOptionPane.showMessageDialog(c, "Error caught: " + e.getMessage(), "ERROR", JOptionPane.ERROR_MESSAGE);
    }// w w w .  j a va 2s .co  m
}

Related

  1. showError(Window parent)
  2. showErrorBox(Component aParent, String aTitle, String aMessage)
  3. showErrorBox(Component pParent, String pMessage, String pTitle)
  4. showErrorConfirmBox(Component pParent, String pMessage, String pTitle, String pLeftOption, String pRightOption)
  5. showErrorDialog(JFrame parent, Exception ex)
  6. showErrorMessage(Component parent, String message)
  7. showErrorMessage(Component parent, String str)
  8. showErrorMessage(Component parent, String str)
  9. showErrorMessage(Component parent, Throwable error)