Java JOptionPane Error error(Component parent, Exception e)

Here you can find the source of error(Component parent, Exception e)

Description

error

License

Apache License

Declaration

static void error(Component parent, Exception e) 

Method Source Code

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

import javax.swing.*;
import java.awt.*;

public class Main {
    static void error(Component parent, String message) {
        JOptionPane.showMessageDialog(parent, message, "Error",
                JOptionPane.ERROR_MESSAGE);
    }//from   w  w  w  .  j  av  a  2  s. c o  m

    static void error(Component parent, Exception e) {
        e.printStackTrace();
        error(parent, e.toString());
    }
}

Related

  1. errMsg(Component owner, String msg, Exception e)
  2. errMsg(final Component owner, final String msg, final Throwable e)
  3. errMsg(final String msg)
  4. errMsg(String msg)
  5. error(Component comp, String title, String message, Object[] args)
  6. error(Component parent, String message)
  7. error(Component parent, String message)
  8. error(Exception ex)
  9. error(final Component component, final Object msg)