display Error Message Dialog - Java Swing

Java examples for Swing:JOptionPane

Description

display Error Message Dialog

Demo Code


//package com.java2s;
import java.awt.Component;

import javax.swing.JOptionPane;

public class Main {
    public static void displayErrorMessage(Component parent, String title,
            String message) {//from   w  w  w  . ja  va 2  s  . c o m
        JOptionPane.showMessageDialog(parent, message, title,
                JOptionPane.ERROR_MESSAGE);
    }
}

Related Tutorials