Java JOptionPane Message showActionFailedWithExceptionMessage(final Component parent, final Exception ex)

Here you can find the source of showActionFailedWithExceptionMessage(final Component parent, final Exception ex)

Description

show Action Failed With Exception Message

License

Apache License

Declaration

public static void showActionFailedWithExceptionMessage(final Component parent, final Exception ex) 

Method Source Code

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

import java.awt.Component;

import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;

public class Main {

    public static void showActionFailedWithExceptionMessage(final Component parent, final Exception ex) {
        SwingUtilities.invokeLater(new Runnable() {
            @Override/*from www .  ja  va2  s.c om*/
            public void run() {
                JOptionPane.showMessageDialog(parent,
                        "Die Aktion konnten nicht abgeschlossen werden, da folgender Fehler auftrat:\n<HTML><I>"
                                + ex.getLocalizedMessage() + "</I></HTML>",
                        "Aktion fehlgeschlagen", JOptionPane.ERROR_MESSAGE);
            }
        });

    }
}

Related

  1. queryDouble(String message, double initialValue)
  2. queryInt(String message, int initialValue)
  3. requestPassword(String titulo, String msg)
  4. select(String[] selList, String msg)
  5. show(String title, int type, Object message, Object[] options, Object initialOption)
  6. showAlert(String message)
  7. showException(Component c, String message, Throwable t)
  8. showException(String message, Exception ex)
  9. showExceptionMessage(Component parent, Throwable t)