show Error Message Dialog - Java Swing

Java examples for Swing:JOptionPane

Description

show Error Message Dialog

Demo Code


//package com.java2s;
import javax.swing.JOptionPane;

public class Main {
    public static void showErrorMessage(String message) {
        JOptionPane.showMessageDialog(null, message, "Error",
                JOptionPane.ERROR_MESSAGE);
    }// ww  w  .j a  v a2  s  .  c om
}

Related Tutorials