Here you can find the source of displayErrorMessage(Component parent, String message)
Parameter | Description |
---|---|
parent | component |
message | error message |
public static void displayErrorMessage(Component parent, String message)
//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); } }