Java JOptionPane Error displayErrorMessage(Component parent, String message)

Here you can find the source of displayErrorMessage(Component parent, String message)

Description

Pops up error message dialog

License

Open Source License

Parameter

Parameter Description
parent component
message error message

Declaration

public static void displayErrorMessage(Component parent, String message) 

Method Source Code


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

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

public class Main {
    /**//from w w w .jav  a  2  s .com
     *
     * Pops up error message dialog
     *
     * @param parent component 
     * @param message error message
     */
    public static void displayErrorMessage(Component parent, String message) {

        JOptionPane.showMessageDialog(parent, message, "Error", JOptionPane.YES_NO_OPTION);
    }
}

Related

  1. createAndShowErrorPanel(String title, Map messages)
  2. displayError(Component parent, String title, String message)
  3. displayError(String message)
  4. displayError(Throwable e)
  5. displayErrorMessage(Component component, Throwable t)
  6. displayErrorMessage(Component parentComponent, String message, String windowTitle)
  7. displayErrorMessage(final Throwable throwable, final Component parentComponent)
  8. displayErrorMessage(String msg, Throwable t)
  9. displayErrors(Component parent, List errors)