show Error Message - Java Swing

Java examples for Swing:JOptionPane

Description

show Error Message

Demo Code


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

public class Main {
    public static void showErrorMessage(String text, String title) {
        showMessageDialog(null, text, title, ERROR_MESSAGE);
    }//from  w  w w.  j  a v a  2 s  .  c  o m

    public static void showErrorMessage(String text) {
        showErrorMessage(text, "Error");
    }
}

Related Tutorials